84% admanage

Code Review | ad Manage

WordPress plugin ad Manage scored84%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: 6.3.1
  • 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

40+ active /2,367 total downloads

Benchmarks

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.03MB] [CPU: ▼1.84ms] Passed 4 tests

Server-side resources used by ad Manage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.16 ▼0.01
Dashboard /wp-admin3.34 ▲0.0347.76 ▼5.71
Posts /wp-admin/edit.php3.39 ▲0.0349.46 ▲1.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.64 ▼1.28
Media Library /wp-admin/upload.php3.26 ▲0.0335.49 ▼0.36
设置广告位置 /wp-admin/options-general.php?page=display_footer_info3.2332.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 12 new options
New WordPress options
display_footerinfo_text
web_description
web_keyword
theysaidso_admin_options
up_ad_text
widget_recent-comments
widget_theysaidso_widget
ad_postion
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

ad Manage: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.64 ▼1.044.03 ▲2.1149.39 ▲4.18
Dashboard /wp-admin2,210 ▲226.04 ▲0.15106.55 ▼12.9346.15 ▲1.26
Posts /wp-admin/edit.php2,090 ▲12.04 ▲0.0235.28 ▼1.5336.68 ▲2.71
Add New Post /wp-admin/post-new.php1,517 ▲317.54 ▲0.07683.05 ▲30.0854.28 ▲3.24
Media Library /wp-admin/upload.php1,389 ▲14.24 ▲0.0498.13 ▼10.0446.10 ▼0.14
设置广告位置 /wp-admin/options-general.php?page=display_footer_info8592.0326.6658.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === admanage === )
Please take inspiration from this readme.txt

admanage/adManage_plugins.php 92% from 13 tests

This is the main PHP file of "ad Manage" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admanage.php" instead of "adManage_plugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin167 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
Great job! No cyclomatic complexity issues were detected in this plugin
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
No PNG images were found in this plugin