78% adspirit

Code Review | AdSpirit AdServer Banner Manager

WordPress plugin AdSpirit AdServer Banner Manager scored 78% from 54 tests.

About plugin

  • Plugin page: adspirit
  • Plugin version: 4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6.2
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Feb 22, 2021
  • Number of updates: 7
  • Update frequency: every 201.6 days
  • Top authors: adspirit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,132 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.10MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by AdSpirit AdServer Banner Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.78 ▼4.25
Dashboard /wp-admin3.40 ▲0.1048.59 ▼7.20
Posts /wp-admin/edit.php3.52 ▲0.1647.81 ▼0.58
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.85 ▼8.45
Media Library /wp-admin/upload.php3.33 ▲0.1037.55 ▼0.06
Update /wp-admin/admin.php?page=adspirit_banner_update3.3234.30
Adspirit /wp-admin/options-general.php?page=adspirit_banner_list3.2929.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 9 new options
New tables
wp_adspirit_banner
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_adspirit-widget
db_upgraded
adspirit_db_version
adspirit_table_name
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for AdSpirit AdServer Banner Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.431.65 ▼0.2042.09 ▲0.20
Dashboard /wp-admin2,213 ▲254.89 ▼0.00110.56 ▼0.0242.49 ▼1.87
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0140.46 ▲5.9135.31 ▲1.97
Add New Post /wp-admin/post-new.php1,522 ▼2023.45 ▲5.37681.31 ▲8.3853.99 ▲4.90
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0799.57 ▼0.1849.13 ▲6.27
Update /wp-admin/admin.php?page=adspirit_banner_update9931.7124.7124.69
Adspirit /wp-admin/options-general.php?page=adspirit_banner_list7912.0523.6823.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • widget_adspirit-widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • adspirit_table_name
    • widget_theysaidso_widget
    • adspirit_db_version
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adspirit/adspirit.php
    • > /wp-content/plugins/adspirit/views/bannerList.php
    • > /wp-content/plugins/adspirit/views/bannerUpdate.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/adspirit/AdspiritWidget.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: responsive, banner, rtb, asynchronous, advertising...

adspirit/adspirit.php 92% from 13 tests

This is the main PHP file of "AdSpirit AdServer Banner Manager" version 4.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 518 characters long)

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
Everything looks great! No dangerous files found in this plugin1,027 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP71802001,027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.50
▷ Minimum class complexity8.00
▷ Maximum class complexity18.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods63
▷ Static methods1930.16%
▷ Public methods6196.83%
▷ Protected methods00.00%
▷ Private methods23.17%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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