83% ad-short

Code Review | Ad Short

WordPress plugin Ad Short scored 83% from 54 tests.

About plugin

  • Plugin page: ad-short
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.9.2
  • First release: Sep 21, 2016
  • Latest release: Nov 15, 2016
  • Number of updates: 14
  • Update frequency: every 3.9 days
  • Top authors: nocaredev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 864 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼303.59ms] Passed 4 tests

This is a short check of server-side resources used by Ad Short
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1156.95 ▲6.31
Dashboard /wp-admin3.48 ▲0.0635.12 ▲1.85
Posts /wp-admin/edit.php3.70 ▲0.0638.43 ▲0.59
Add New Post /wp-admin/post-new.php6.94 ▼0.0397.07 ▼1,221.95
Media Library /wp-admin/upload.php3.35 ▲0.0529.20 ▲5.14
Ad Short /wp-admin/tools.php?page=ad_short3.3123.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Ad Short: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,824 ▲8217.06 ▲1.4431.38 ▲25.302.27 ▲0.10
Dashboard /wp-admin2,924 ▲706.14 ▼0.04120.33 ▼13.90154.44 ▼4.27
Posts /wp-admin/edit.php2,695 ▲43.24 ▲0.0161.85 ▼9.03134.15 ▼15.84
Add New Post /wp-admin/post-new.php1,669 ▲816.17 ▼4.32418.08 ▲10.75156.53 ▲4.04
Media Library /wp-admin/upload.php1,699 ▲45.55 ▲0.08166.83 ▲18.18188.24 ▲2.85
Ad Short /wp-admin/tools.php?page=ad_short1,1202.5452.94138.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ad_short
    • > Notice in wp-content/plugins/ad-short/ad_short.php+283
    Trying to access array offset on value of type bool

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ad-short/ad_short.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/ad-short/template/options.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: ads in page, ads within post, ads within page, adsense, mce editor buttons...

ad-short/ad_short.php 92% from 13 tests

The primary PHP file in "Ad Short" version 2.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ad-short.php" instead of "ad_short.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin400 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25453218
CSS2141122
JavaScript10060

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin