83% ambition-resource-latest-redirect

Code Review | AMB Redirect

WordPress plugin AMB Redirect scored83%from 54 tests.

About plugin

  • Plugin page: ambition-resource...
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Feb 20, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: jonathonklem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

A check of server-side resources used by AMB Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.43 ▼0.86
Dashboard /wp-admin3.31 ▲0.0149.14 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0149.03 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.70 ▼18.79
Media Library /wp-admin/upload.php3.23 ▲0.0134.97 ▼0.39

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for AMB Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.071.61 ▼0.1542.52 ▼0.92
Dashboard /wp-admin2,195 ▲215.65 ▲0.1189.28 ▼13.5242.28 ▼4.92
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0239.38 ▲4.0335.47 ▲0.58
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.35592.25 ▼99.5755.80 ▼0.01
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0896.70 ▼7.4544.40 ▼1.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ambition-resource-latest-redirect/amb-redirect.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
5 plugin tags: latest post, redirect latest, redirect post, latest, redirect

ambition-resource-latest-redirect/amb-redirect.php 77% from 13 tests

Analyzing the main PHP file in "AMB Redirect" version 0.0.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ambition-resource-latest-redirect.php" instead of "amb-redirect.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin85 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1346685

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin