80% slug-control

Code Review | Slug Control

WordPress plugin Slug Control scored80%from 54 tests.

About plugin

  • Plugin page: slug-control
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2015
  • Latest release: Apr 23, 2015
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: markjaquith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,106 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.93MB] [CPU: ▼32.62ms] Passed 4 tests

A check of server-side resources used by Slug Control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0723.32 ▼17.23
Dashboard /wp-admin3.02 ▼0.2924.84 ▼24.33
Posts /wp-admin/edit.php3.02 ▼0.3426.22 ▼19.13
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.33 ▼69.80
Media Library /wp-admin/upload.php3.02 ▼0.2124.90 ▼12.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Slug Control: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.131.64 ▼0.6842.69 ▼0.26
Dashboard /wp-admin2,195 ▲185.58 ▼0.0891.77 ▲3.7639.69 ▼1.13
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0238.81 ▲2.9337.26 ▼5.82
Add New Post /wp-admin/post-new.php1,526 ▼021.16 ▼1.95684.98 ▲40.5940.26 ▼13.51
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.0298.19 ▼0.4544.52 ▼1.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/slug-control/classes/plugin.php+112
    Undefined variable: raw
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: urls, slug, post slug

slug-control/slug-control.php 92% from 13 tests

The main PHP script in "Slug Control" version 0.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin196 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP438115178
Sass1007
Markdown3306
CoffeeScript1124
JavaScript1011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.67
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods414.81%
▷ Public methods1970.37%
▷ Protected methods311.11%
▷ Private methods518.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected