84% frontier-restrict-backend

Code Review | Frontier Restrict Backend

WordPress plugin Frontier Restrict Backend scored84%from 54 tests.

About plugin

  • Plugin page: frontier-restrict...
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.4.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2015
  • Latest release: Apr 13, 2023
  • Number of updates: 29
  • Update frequency: every 97.9 days
  • Top authors: finnj (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.92ms] Passed 4 tests

Analyzing server-side resources used by Frontier Restrict Backend
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.81 ▼6.56
Dashboard /wp-admin3.31 ▲0.0149.41 ▼4.48
Posts /wp-admin/edit.php3.36 ▲0.0148.01 ▼1.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.17 ▼6.73
Media Library /wp-admin/upload.php3.24 ▲0.0137.81 ▲5.35

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Frontier Restrict Backend: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.072.14 ▼0.0143.49 ▼4.36
Dashboard /wp-admin2,195 ▲185.62 ▼0.1995.06 ▼6.1742.02 ▼3.98
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0134.30 ▼2.9638.82 ▲2.94
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▼0.37657.37 ▼16.0963.20 ▲11.80
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.0499.38 ▼0.9945.53 ▲0.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/frontier-restrict-backend/frontier-restrict-backend.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

frontier-restrict-backend/frontier-restrict-backend.php Passed 13 tests

The main file in "Frontier Restrict Backend" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Restrict non-admin users from accessing the backend (admin area)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171838

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin