10% wp-addvert

Code Review | WP-Addvert

WordPress plugin WP-Addvert scored10%from 54 tests.

About plugin

  • Plugin page: wp-addvert
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Oct 6, 2013
  • Latest release: May 18, 2015
  • Number of updates: 24
  • Update frequency: every 24.5 days
  • Top authors: riccardo.mastellone (75%)Iazel (29.17%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,021 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-addvert/wp-addvert.php+176
    Trying to access array offset on value of type bool

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

Analyzing server-side resources used by WP-Addvert
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.51 ▼7.00
Dashboard /wp-admin3.31 ▼0.0455.42 ▼14.12
Posts /wp-admin/edit.php3.36 ▲0.0057.84 ▲2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.96 ▼11.53
Media Library /wp-admin/upload.php3.23 ▲0.0039.13 ▲4.73

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
addvert_options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Addvert
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.20 ▼0.031.75 ▲0.0945.14 ▼4.52
Dashboard /wp-admin2,198 ▲245.64 ▼0.1193.02 ▼7.4044.38 ▼2.45
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0139.94 ▲3.9341.09 ▲4.65
Add New Post /wp-admin/post-new.php1,526 ▼223.65 ▲0.42660.43 ▲7.5968.61 ▲12.87
Media Library /wp-admin/upload.php1,397 ▲34.19 ▼0.0598.11 ▲2.2143.23 ▲1.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • addvert_options
    • widget_recent-posts
    • can_compress_scripts

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)
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
Almost there! Just fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-addvert/form.php:13
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/wp-addvert/form.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-addvert/wp-addvert.php:22
    • > PHP Notice
      Undefined variable: updated in wp-content/plugins/wp-addvert/form.php on line 1
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/wp-addvert/form.php on line 6
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/wp-addvert/form.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: Add an image for screenshot #1 (WP-Addvert settings page)
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "WP-Addvert" version 1.8
97 characters long description:
Aggiunge i meta tag necessari al funzionamento di Addvert e permette il tracciamento dell'ordine.

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
Good job! No executable or dangerous file extensions detected279 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24735279

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1571.43%
▷ Protected methods14.76%
▷ Private methods523.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.15MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png21.46KB3.62KB▼ 83.12%
assets/icon.png16.07KB0.72KB▼ 95.50%
assets/button_small.png16.92KB1.80KB▼ 89.38%
assets/button_standard.png18.67KB2.67KB▼ 85.69%
assets/icon-256x256.png41.73KB11.78KB▼ 71.77%