84% system-admin

Code Review | System Admin

WordPress plugin System Admin scored84%from 54 tests.

About plugin

  • Plugin page: system-admin
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2019
  • Latest release: Nov 13, 2019
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: papermud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.89ms] Passed 4 tests

Analyzing server-side resources used by System Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.85 ▲3.58
Dashboard /wp-admin3.47 ▲0.1749.02 ▲3.96
Posts /wp-admin/edit.php3.59 ▲0.2349.32 ▲2.00
Add New Post /wp-admin/post-new.php6.07 ▲0.1982.21 ▼15.73
Media Library /wp-admin/upload.php3.40 ▲0.1737.30 ▲2.60

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
jmsa_version
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for System Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.14 ▼1.531.62 ▼0.0842.62 ▲2.65
Dashboard /wp-admin2,219 ▲285.85 ▼0.03108.19 ▲8.6539.69 ▼5.35
Posts /wp-admin/edit.php2,105 ▲132.02 ▲0.0040.21 ▼2.8335.80 ▼2.99
Add New Post /wp-admin/post-new.php1,533 ▲523.17 ▼0.03648.94 ▲52.0263.50 ▲16.19
Media Library /wp-admin/upload.php1,404 ▲194.19 ▼0.04106.68 ▲4.5046.56 ▲6.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • jmsa_version
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(JMSA_LIBRARY_PATH/adminmenupage/options.php): failed to open stream: No such file or directory in wp-content/plugins/system-admin/lib/adminmenu.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-admin/lib/functions.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/system-admin/system-admin.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'JMSA_LIBRARY_PATH/helper/roles.php' (include_path='.:/usr/share/php') in wp-content/plugins/system-admin/lib/roles.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-admin/lib/adminmenupage/adminmenu.php:19
    • > PHP Fatal error
      require_once(): Failed opening required 'JMSA_LIBRARY_PATH/adminmenupage/options.php' (include_path='.:/usr/share/php') in wp-content/plugins/system-admin/lib/adminmenu.php on line 2
    • > PHP Warning
      require_once(JMSA_LIBRARY_PATH/helper/roles.php): failed to open stream: No such file or directory in wp-content/plugins/system-admin/lib/roles.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-admin/lib/adminmenupage/promoteself.php:14
    • > PHP Warning
      Use of undefined constant JMSA_LIBRARY_PATH - assumed 'JMSA_LIBRARY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/system-admin/lib/adminmenu.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-admin/lib/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: disable update, disable updates, system admin, hide menu, menu...

system-admin/system-admin.php 92% from 13 tests

The principal PHP file in "System Admin" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin732 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14215346701
JavaScript111725
CSS1116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.40
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods45
▷ Static methods511.11%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected