78% adthrive-ads

Code Review | Raptive Ads

WordPress plugin Raptive Ads scored78%from 54 tests.

About plugin

  • Plugin page: adthrive-ads
  • Plugin version: 3.5.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 117
  • Update frequency: every 23.8 days
  • Top authors: adthrive (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

5,000+ active /111,905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.12MB] [CPU: ▲5.36ms] Passed 4 tests

This is a short check of server-side resources used by Raptive Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8649.76 ▲6.53
Dashboard /wp-admin4.53 ▲1.2254.20 ▲1.28
Posts /wp-admin/edit.php4.55 ▲1.1961.21 ▲11.16
Add New Post /wp-admin/post-new.php7.43 ▲1.5493.05 ▲2.45
Media Library /wp-admin/upload.php4.45 ▲1.2247.72 ▲16.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 421 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Raptive Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10114.34 ▼0.107.01 ▲5.3444.35 ▲1.28
Dashboard /wp-admin2,212 ▲355.59 ▼0.0789.29 ▼10.9040.25 ▼2.95
Posts /wp-admin/edit.php2,123 ▲202.04 ▲0.0541.07 ▲1.3234.89 ▲0.88
Add New Post /wp-admin/post-new.php6,360 ▲4,83220.93 ▼2.55886.47 ▲203.8478.35 ▲15.96
Media Library /wp-admin/upload.php1,426 ▲234.37 ▲0.23103.07 ▲2.3546.08 ▼0.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • adthrive_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adthrive-ads/components/ads/partials/insertion-includes.php
    • > /wp-content/plugins/adthrive-ads/components/ads/partials/sync-error.php
  • 47× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Notice
      Undefined variable: body_classes in wp-content/plugins/adthrive-ads/components/ads/partials/insertion-includes.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adthrive-ads/cmb2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/adthrive-ads/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/adthrive-ads/uninstall.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/adthrive-ads/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2 in adthrive-ads/assets to your readme.txt
Please take inspiration from this readme.txt

adthrive-ads/adthrive-ads.php Passed 13 tests

"Raptive Ads" version 3.5.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
11 characters long description:
Raptive Ads

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin50,088 lines of code in 269 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP862,7197,6079,651
CSS152521,2024,868
JavaScript163885911,656
Sass17305291,407
HTML153677183

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.47
Average class complexity17.84
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes96
▷ Abstract classes99.38%
▷ Concrete classes8790.62%
▷ Final classes00.00%
Methods708
▷ Static methods10214.41%
▷ Public methods57881.64%
▷ Protected methods9413.28%
▷ Private methods365.08%
Functions41
▷ Named functions3790.24%
▷ Anonymous functions49.76%
Constants17
▷ Global constants1058.82%
▷ Class constants741.18%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.17MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.18KB0.00KB▼ 100.00%
(invalid) cmb2/images/ui-bg_glass_75_dadada_1x400.png0.16KB0.00KB▼ 100.00%
(invalid) cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.14KB0.00KB▼ 100.00%
(invalid) cmb2/images/ui-icons_cd0a0a_256x240.png7.80KB0.00KB▼ 100.00%
assets/banner-1544x500.png32.37KB13.33KB▼ 58.84%