77% casino-sports-betting-affiliate-auto-ads

Code Review | Casino & Sports Betting Affiliate Auto Ads

WordPress plugin Casino & Sports Betting Affiliate Auto Ads scored77%from 54 tests.

About plugin

  • Plugin page: casino-sports-bet...
  • Plugin version: 1.8.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2022
  • Latest release: Oct 22, 2023
  • Number of updates: 31
  • Update frequency: every 14.1 days
  • Top authors: dmdbgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,808 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.38ms] Passed 4 tests

Server-side resources used by Casino & Sports Betting Affiliate Auto Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.16 ▲0.86
Dashboard /wp-admin3.33 ▼0.0145.66 ▼12.51
Posts /wp-admin/edit.php3.38 ▲0.0349.72 ▲1.05
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.01 ▼2.91
Media Library /wp-admin/upload.php3.25 ▲0.0333.57 ▲3.17

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Casino & Sports Betting Affiliate Auto Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.39 ▼1.108.41 ▲6.9238.47 ▼0.51
Dashboard /wp-admin2,211 ▲345.54 ▼0.1282.86 ▼10.4138.38 ▼6.26
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0540.42 ▼1.2734.96 ▼3.45
Add New Post /wp-admin/post-new.php1,540 ▲1423.28 ▼0.31619.02 ▼26.7162.49 ▲5.95
Media Library /wp-admin/upload.php1,419 ▲194.22 ▼0.0094.13 ▼7.3244.87 ▲3.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/casino-sports-betting-affiliate-auto-ads/public/partials/settings-page-public-display.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/casino-sports-betting-affiliate-auto-ads/admin/partials/settings-page-admin-display.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/casino-sports-betting-affiliate-auto-ads/settings-page.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/casino-sports-betting-affiliate-auto-ads/admin/partials/settings-page-admin-settings-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (With 1-click, enable popover ads that float over the screen with bonus offers.) image required
You can look at the official readme.txt

casino-sports-betting-affiliate-auto-ads/settings-page.php 85% from 13 tests

The primary PHP file in "Casino & Sports Betting Affiliate Auto Ads" version 1.8.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("casino-sports-betting-affiliate-auto-ads.php" instead of "settings-page.php")
  • Description: The description should be shorter than 140 characters (currently 349 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin809 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13183595715
JavaScript5187994
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 3.04MB with 2.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/static/affiliate_id.png198.73KB55.00KB▼ 72.32%
assets/landing/3690.png66.03KB12.24KB▼ 81.46%
assets/banner-772x250.png105.51KB30.92KB▼ 70.69%
assets/icon-128x128.png16.12KB8.25KB▼ 48.83%
assets/landing/2.png80.68KB6.00KB▼ 92.57%