83% slash-admin

Code Review | Slash Admin

WordPress plugin Slash Admin scored83%from 54 tests.

About plugin

  • Plugin page: slash-admin
  • Plugin version: 3.8.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2013
  • Latest release: Nov 2, 2022
  • Number of updates: 112
  • Update frequency: every 29.5 days
  • Top authors: gsarig (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

900+ active /24,790 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
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲9.36ms] Passed 4 tests

This is a short check of server-side resources used by Slash Admin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0647.54 ▼0.62
Dashboard /wp-admin3.54 ▲0.2066.70 ▲4.77
Posts /wp-admin/edit.php3.60 ▲0.2473.91 ▲18.10
Add New Post /wp-admin/post-new.php6.13 ▲0.24121.52 ▲18.58
Media Library /wp-admin/upload.php3.47 ▲0.2553.71 ▲15.17
Slash Admin /wp-admin/tools.php?page=slashadmin-options3.4754.32

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
slashadmin_options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Slash Admin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲6114.74 ▲0.561.91 ▼0.7944.73 ▼8.28
Dashboard /wp-admin2,210 ▲225.83 ▼0.04108.49 ▼5.8540.97 ▼1.02
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0141.86 ▲0.5036.07 ▼1.85
Add New Post /wp-admin/post-new.php1,517 ▼2517.57 ▼0.83641.99 ▼18.5865.64 ▲6.08
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0197.07 ▼17.5346.26 ▼2.61
Slash Admin /wp-admin/tools.php?page=slashadmin-options2,6833.3670.9564.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slash-admin/inc/acf-mods.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
The official readme.txt is a good inspiration

slash-admin/slashadmin.php 85% from 13 tests

"Slash Admin" version 3.8.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 197 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("slash-admin.php" instead of "slashadmin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected4,489 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP316026613,061
PO File12884401,159
CSS170231
JavaScript29838

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity17.25
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods85
▷ Static methods2225.88%
▷ Public methods7082.35%
▷ Protected methods22.35%
▷ Private methods1315.29%
Functions68
▷ Named functions6595.59%
▷ Anonymous functions34.41%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin