78% oboxmedia-ads

Code Review | Oboxmedia Ads

WordPress plugin Oboxmedia Ads scored78%from 54 tests.

About plugin

  • Plugin page: oboxmedia-ads
  • Plugin version: 1.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.0
  • WordPress version: 6.3.1
  • First release: Aug 3, 2015
  • Latest release: May 12, 2023
  • Number of updates: 159
  • Update frequency: every 17.9 days
  • Top authors: patforg (71.07%)cdpierre (29.56%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,033 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.10MB] [CPU: ▼13.91ms] Passed 4 tests

Analyzing server-side resources used by Oboxmedia Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0045.74 ▼13.96
Dashboard /wp-admin3.34 ▲0.0348.09 ▼27.48
Posts /wp-admin/edit.php3.39 ▼0.4649.33 ▼1.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.66 ▼13.03
Media Library /wp-admin/upload.php3.26 ▲0.0337.41 ▲4.39
Oboxads Settings /wp-admin/options-general.php?page=oboxads3.2531.34

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_oboxads-ad-widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Oboxmedia Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8415.15 ▲0.6427.56 ▲25.7241.76 ▼6.66
Dashboard /wp-admin2,210 ▲275.80 ▲0.8998.13 ▼78.1436.11 ▼36.23
Posts /wp-admin/edit.php2,072 ▼202.00 ▲0.0137.03 ▼5.8232.64 ▼0.64
Add New Post /wp-admin/post-new.php1,536 ▲123.00 ▲0.01572.95 ▼46.6655.64 ▼6.69
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0094.95 ▼1.0540.82 ▼1.48
Oboxads Settings /wp-admin/options-general.php?page=oboxads7862.0326.2929.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_oboxads-ad-widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/oboxmedia-ads/views/public.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/oboxmedia-ads/includes/oboxads-ad-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: oboxmediacom, ads, publishing, oboxmedia, advertising

oboxmedia-ads/oboxmedia-ads-plugin.php 85% from 13 tests

Analyzing the main PHP file in "Oboxmedia Ads" version 1.9.3
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("oboxmedia-ads.php" instead of "oboxmedia-ads-plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin942 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP21275377923
JSON20010
Bourne Shell1108
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.50
▷ Minimum class complexity10.00
▷ Maximum class complexity27.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
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
No PNG files were detected