94% advertisement-space

Code Review | Advertisement Space

WordPress plugin Advertisement Space scored 94% 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: 5.8.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 / 188 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Advertisement Space
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.1734.10 ▲11.11
Dashboard /wp-admin3.29 ▲0.2231.89 ▼12.97
Posts /wp-admin/edit.php3.34 ▲0.2332.30 ▲2.07
Add New Post /wp-admin/post-new.php5.59 ▲0.1577.87 ▼585.60
Media Library /wp-admin/upload.php3.17 ▲0.1623.46 ▼0.96
All Advertisements /wp-admin/edit.php?post_type=advertisement3.2124.60
Add Advertisement /wp-admin/post-new.php?post_type=advertisement3.2336.73

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advertisement Space
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,824 ▲22316.41 ▲0.748.66 ▲3.5975.01 ▼0.69
Dashboard /wp-admin2,975 ▲796.03 ▼0.12114.93 ▼24.33165.91 ▼11.22
Posts /wp-admin/edit.php2,786 ▲493.25 ▲0.0364.77 ▲4.16134.52 ▼3.91
Add New Post /wp-admin/post-new.php2,527 ▼1,23216.64 ▼2.20390.30 ▼58.90154.14 ▼12.33
Media Library /wp-admin/upload.php1,797 ▲455.59 ▲0.06147.01 ▲6.32183.17 ▲0.28
All Advertisements /wp-admin/edit.php?post_type=advertisement1,4733.1661.54113.65
Add Advertisement /wp-admin/post-new.php?post_type=advertisement2,7065.5495.79147.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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 output non-empty strings when accessed directly via GET requests:
    • > /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 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

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

The principal PHP file in "Advertisement Space" v. 1.0.0 is loaded by WordPress automatically on each request
47 characters long description:
Plugin To place Advertisement in your wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected955 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12188623743
CSS22125152
JavaScript2105560

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
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
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4081.63%
▷ Protected methods00.00%
▷ Private methods918.37%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin