84% ad-refresh-control

Code Review | Ad Refresh Control

WordPress plugin Ad Refresh Control scored84%from 54 tests.

About plugin

  • Plugin page: ad-refresh-control
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Nov 16, 2023
  • Number of updates: 11
  • Update frequency: every 104.9 days
  • Top authors: 10up (54.55%)10upbot (54.55%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /42,245 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.15MB] [CPU: ▼9.86ms] Passed 4 tests

A check of server-side resources used by Ad Refresh Control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.62 ▼5.10
Dashboard /wp-admin3.46 ▲0.1146.96 ▼15.63
Posts /wp-admin/edit.php3.57 ▲0.2246.15 ▼0.66
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.86 ▼15.95
Media Library /wp-admin/upload.php3.38 ▲0.1534.15 ▼2.75
Ad Refresh Control /wp-admin/options-general.php?page=ad-refresh-control-settings3.3530.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ad Refresh Control
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1214.73 ▲0.314.64 ▲2.5043.13 ▼1.64
Dashboard /wp-admin2,202 ▲225.65 ▲0.0790.43 ▼6.3441.00 ▼5.01
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0137.33 ▼1.3232.96 ▼6.11
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▲0.31658.17 ▼26.9951.65 ▼1.24
Media Library /wp-admin/upload.php1,401 ▲14.17 ▼0.0196.24 ▼19.7742.69 ▼3.02
Ad Refresh Control /wp-admin/options-general.php?page=ad-refresh-control-settings8942.1924.6827.01

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ad-refresh-control/ad-refresh-control.php:21

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: ad manager, google

ad-refresh-control/ad-refresh-control.php 92% from 13 tests

Analyzing the main PHP file in "Ad Refresh Control" version 1.1.4
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin961 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13226575955
JSON1005
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.25
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1946.34%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions31
▷ Named functions2270.97%
▷ Anonymous functions929.03%
Constants4
▷ Global constants4100.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