84% wp-avertere

Code Review | WP Avertere

WordPress plugin WP Avertere scored84%from 54 tests.

About plugin

  • Plugin page: wp-avertere
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2012
  • Latest release: Nov 8, 2012
  • Number of updates: 8
  • Update frequency: every 13.9 days
  • Top authors: vicchi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.14ms] Passed 4 tests

A check of server-side resources used by WP Avertere
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.15 ▼3.04
Dashboard /wp-admin3.37 ▲0.0748.45 ▼5.23
Posts /wp-admin/edit.php3.49 ▲0.1349.92 ▲1.46
Add New Post /wp-admin/post-new.php6.02 ▲0.1391.26 ▼12.21
Media Library /wp-admin/upload.php3.30 ▲0.0736.41 ▼0.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
wp_avertere_settings
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Avertere
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.18 ▼0.231.65 ▼0.3343.52 ▼0.97
Dashboard /wp-admin2,195 ▲215.62 ▼0.0390.00 ▲1.7640.35 ▲3.19
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0340.06 ▲2.5035.78 ▲1.79
Add New Post /wp-admin/post-new.php6,288 ▲4,75921.07 ▼2.14880.86 ▲198.4986.31 ▲31.46
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0399.56 ▼20.8043.41 ▼7.85

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-avertere/wp-avertere.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Edit Post *Redirect This Post* meta box; unsupported format URL.)
You can take inspiration from this readme.txt

wp-avertere/wp-avertere.php Passed 13 tests

"WP Avertere" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
123 characters long description:
Set up and manage an HTTP 301/302 Redirect from the URL of any post type to another URL, either on your site or externally.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin454 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP396125337
PO File1141344
CSS24038
JavaScript23035

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.00
▷ Minimum class complexity3.00
▷ Maximum class complexity65.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants216.67%
▷ Class constants1083.33%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/success.png0.43KB0.49KB0.00%
images/warning.png0.57KB0.67KB0.00%
images/error.png0.54KB0.66KB0.00%