10% a-ads

Code Review | A-ADS

WordPress plugin A-ADS scored10%from 54 tests.

About plugin

  • Plugin page: a-ads
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.0
  • WordPress version: 6.3.1
  • First release: Dec 2, 2020
  • Latest release: Jun 22, 2022
  • Number of updates: 17
  • Update frequency: every 33.4 days
  • Top authors: uix642 (94.12%)arsenische (11.76%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,719 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/a-ads/core.php+46
    Undefined variable: aads_core_functions

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.99ms] Passed 4 tests

A check of server-side resources used by A-ADS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.75 ▼36.17
Dashboard /wp-admin2.05 ▼1.3011.21 ▼56.54
Posts /wp-admin/edit.php2.05 ▼1.315.83 ▼42.48
Add New Post /wp-admin/post-new.php2.05 ▼3.845.74 ▼96.76
Media Library /wp-admin/upload.php2.05 ▼1.186.05 ▼32.63

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A-ADS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.70 ▼0.671.98 ▲0.1842.08 ▼1.84
Dashboard /wp-admin2,206 ▲154.87 ▼0.02110.25 ▼7.3937.53 ▼8.53
Posts /wp-admin/edit.php2,086 ▼62.02 ▲0.0637.97 ▲2.2034.47 ▼1.34
Add New Post /wp-admin/post-new.php1,530 ▼323.08 ▲0.09672.82 ▲34.7459.15 ▲5.37
Media Library /wp-admin/upload.php1,385 ▲34.22 ▲0.0597.76 ▼4.1741.43 ▼3.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/a-ads/core.php+46
    Undefined variable: aads_core_functions
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_aads_ads_widget

Smoke tests 50% 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)
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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/a-ads/A-ADS.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'wp_widget' not found in wp-content/plugins/a-ads/widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a-ads/core.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === a-ads === )
You can take inspiration from this readme.txt

a-ads/A-ADS.php 69% from 13 tests

The main PHP script in "A-ADS" version 1.1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("/A-ADS")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("a-ads.php" instead of "A-ADS.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.5" instead of "5.2")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected263 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP58289263
CSS1010
JavaScript1010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected