74% adcovery

Code Review | Adcovery

WordPress plugin Adcovery scored74%from 54 tests.

About plugin

  • Plugin page: adcovery
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2021
  • Latest release: Dec 13, 2022
  • Number of updates: 12
  • Update frequency: every 55.8 days
  • Top authors: adcovery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /520 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.14MB] [CPU: ▼0.60ms] Passed 4 tests

Analyzing server-side resources used by Adcovery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1348.57 ▲8.23
Dashboard /wp-admin3.49 ▲0.1854.68 ▲0.08
Posts /wp-admin/edit.php3.54 ▲0.1851.82 ▼0.30
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.52 ▼8.25
Media Library /wp-admin/upload.php3.35 ▲0.1238.56 ▲6.08
Adcovery /wp-admin/options-general.php?page=adcovery_admin_page3.3336.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
adcovery_last_error_msg
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
adcovery_last_heartbeat

Browser metrics Passed 4 tests

Checking browser requirements for Adcovery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲4914.10 ▼0.272.26 ▲0.2444.16 ▼0.26
Dashboard /wp-admin2,201 ▲215.66 ▲0.0593.54 ▲0.3538.79 ▼5.18
Posts /wp-admin/edit.php2,103 ▼02.00 ▲0.0238.33 ▼3.7036.94 ▼1.28
Add New Post /wp-admin/post-new.php1,533 ▲723.00 ▼0.13676.51 ▼6.3648.26 ▼20.39
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.00100.98 ▼4.1445.50 ▲1.10
Adcovery /wp-admin/options-general.php?page=adcovery_admin_page8432.0021.6826.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/adcovery/uninstall.php+35
    Constant ADCOVERY_PLUGIN_DIR already defined
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Adcovery' not found in wp-content/plugins/adcovery/includes/class-adcovery-heartbeat.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/adcovery/uninstall.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Adcovery' not found in wp-content/plugins/adcovery/admin/class-adcovery-admin.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adcovery/admin/partials/adcovery-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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 descriptions for screenshots #1, #2, #3 in adcovery/assets to your readme.txt
You can look at the official readme.txt

adcovery/adcovery.php Passed 13 tests

The main PHP file in "Adcovery" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
39 characters long description:
Resilient Advertising For Your Website.

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
Good job! No executable or dangerous file extensions detected756 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP15400652717
CSS13039

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.18
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1015.62%
▷ Public methods5484.38%
▷ Protected methods23.12%
▷ Private methods812.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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