72% ad-short

Code Review | Ad Short

WordPress plugin Ad Short scored72%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: 6.3.1
  • 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 /1,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by Ad Short
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.49 ▲3.01
Dashboard /wp-admin3.36 ▲0.0244.24 ▼13.04
Posts /wp-admin/edit.php3.47 ▲0.1242.96 ▼5.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.14 ▼9.63
Media Library /wp-admin/upload.php3.28 ▲0.0635.22 ▼1.29
Ad Short /wp-admin/tools.php?page=ad_short3.2427.50

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ad Short
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12014.30 ▼0.3539.22 ▲37.5239.44 ▲0.47
Dashboard /wp-admin2,228 ▲535.62 ▼0.1188.61 ▼9.0142.33 ▼2.75
Posts /wp-admin/edit.php2,106 ▲62.04 ▲0.0833.02 ▼9.6035.53 ▲0.98
Add New Post /wp-admin/post-new.php1,534 ▲823.51 ▲0.64598.95 ▲12.0273.42 ▲13.83
Media Library /wp-admin/upload.php1,406 ▲64.24 ▲0.0498.34 ▲2.0343.32 ▼5.69
Ad Short /wp-admin/tools.php?page=ad_short8951.9723.0944.94

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /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 a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: ads within page, ads in post, mce editor buttons, ads in page, adsense...

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

The entry point to "Ad Short" version 2.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal 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
No dangerous file extensions were detected400 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25453218
CSS2141122
JavaScript10060

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues 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
There are no PNG files in this plugin