84% pilotpress-custom-redirect

Code Review | Pilotpress Custom Redirect

WordPress plugin Pilotpress Custom Redirect scored84%from 54 tests.

About plugin

  • Plugin page: pilotpress-custom...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Apr 11, 2016
  • Number of updates: 5
  • Update frequency: every 108.8 days
  • Top authors: itmooti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.29ms] Passed 4 tests

An overview of server-side resources used by Pilotpress Custom Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.30 ▲0.67
Dashboard /wp-admin3.35 ▼0.0046.26 ▼10.24
Posts /wp-admin/edit.php3.40 ▲0.0448.14 ▲2.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.27 ▼14.56
Media Library /wp-admin/upload.php3.27 ▲0.0436.67 ▲3.66
Pilotpress Custom Redirect /wp-admin/options-general.php?page=pilotpress-custom-redirect3.2329.40

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
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Pilotpress Custom Redirect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.26 ▼1.551.65 ▼0.1343.73 ▼0.71
Dashboard /wp-admin2,210 ▲185.84 ▲0.87116.18 ▲5.6238.85 ▼0.53
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0239.20 ▼4.9535.09 ▼3.92
Add New Post /wp-admin/post-new.php1,536 ▼023.50 ▲0.45631.86 ▲34.5656.92 ▲2.99
Media Library /wp-admin/upload.php1,392 ▲44.12 ▼0.0895.18 ▼9.1942.86 ▼2.16
Pilotpress Custom Redirect /wp-admin/options-general.php?page=pilotpress-custom-redirect7692.0624.2226.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pilotpress-custom-redirect/pilotpress-custom-redirect.php:16

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: comments, spam

pilotpress-custom-redirect/pilotpress-custom-redirect.php Passed 13 tests

Analyzing the main PHP file in "Pilotpress Custom Redirect" version 1.1
59 characters long description:
Restrict Users from access to Posts/Pages using Day Counter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin161 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11111161

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.65
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin