84% advertisement-space

Code Review | Advertisement Space

WordPress plugin Advertisement Space scored84%from 54 tests.

About plugin

  • Plugin page: advertisement-space
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Dec 22, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: intlum (100%)Otto42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.61ms] Passed 4 tests

An overview of server-side resources used by Advertisement Space
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1740.84 ▲1.98
Dashboard /wp-admin3.47 ▲0.1747.13 ▼1.73
Posts /wp-admin/edit.php3.59 ▲0.2342.70 ▼5.29
Add New Post /wp-admin/post-new.php6.08 ▲0.1987.58 ▲2.58
Media Library /wp-admin/upload.php3.39 ▲0.1737.53 ▲7.69
All Advertisements /wp-admin/edit.php?post_type=advertisement3.4436.03
Add Advertisement /wp-admin/post-new.php?post_type=advertisement3.4550.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Advertisement Space
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.84 ▼0.7810.09 ▲8.6243.88 ▲3.80
Dashboard /wp-admin2,231 ▲505.63 ▼0.0997.62 ▼1.9046.73 ▲4.47
Posts /wp-admin/edit.php2,134 ▲312.01 ▲0.0434.76 ▼8.6734.29 ▼4.09
Add New Post /wp-admin/post-new.php1,558 ▲2123.12 ▲5.08663.92 ▲28.7859.20 ▼1.31
Media Library /wp-admin/upload.php1,437 ▲344.25 ▲0.0796.34 ▼5.0842.15 ▼2.97
All Advertisements /wp-admin/edit.php?post_type=advertisement1,0971.9131.0930.80
Add Advertisement /wp-admin/post-new.php?post_type=advertisement1,9893.7264.3432.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, 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
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advertisement-space/admin/partials/advertisement-space-admin-display.php
    • > /wp-content/plugins/advertisement-space/public/partials/advertisement-space-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("chandan")
You can look at the official readme.txt

advertisement-space/advertisement-space.php Passed 13 tests

"Advertisement Space" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
Plugin To place Advertisement in your wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected955 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.14
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods24.08%
▷ Public methods4081.63%
▷ Protected methods00.00%
▷ Private methods918.37%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin