94% admanage

Code Review | ad Manage

WordPress plugin ad Manage scored 94% from 54 tests.

About plugin

  • Plugin page: admanage
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.1
  • WordPress version: 5.9.2
  • First release: Dec 18, 2012
  • Latest release: Dec 23, 2012
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: ywchen2000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,991 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼294.95ms] Passed 4 tests

An overview of server-side resources used by ad Manage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0658.80 ▲0.65
Dashboard /wp-admin3.44 ▲0.0338.61 ▼0.86
Posts /wp-admin/edit.php3.67 ▲0.0365.59 ▲21.93
Add New Post /wp-admin/post-new.php6.91 ▼0.0696.43 ▼1,177.72
Media Library /wp-admin/upload.php3.33 ▲0.0324.60 ▼1.86
设置广告位置 /wp-admin/options-general.php?page=display_footer_info3.2923.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
ad_postion
up_ad_text
web_keyword
display_footerinfo_text
web_description
down_ad_text

Browser metrics Passed 4 tests

A check of browser resources used by ad Manage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4615.39 ▼0.646.49 ▲0.1321.45 ▲19.44
Dashboard /wp-admin2,897 ▲396.15 ▼0.00120.08 ▼40.19171.40 ▲14.65
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0164.17 ▲0.53150.52 ▼55.66
Add New Post /wp-admin/post-new.php1,664 ▼4716.53 ▼5.13424.09 ▼22.17165.05 ▼22.85
Media Library /wp-admin/upload.php1,706 ▲55.51 ▼0.05140.54 ▼8.17207.12 ▲17.78
设置广告位置 /wp-admin/options-general.php?page=display_footer_info1,0972.4198.76183.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/admanage/adManage_plugins.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === admanage === )
You can take inspiration from this readme.txt

admanage/adManage_plugins.php 92% from 13 tests

"ad Manage" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("admanage.php" instead of "adManage_plugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected167 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11429167

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin