84% custom-advertisements-management

Code Review | Custom Advertisement Management

WordPress plugin Custom Advertisement Management scored84%from 54 tests.

About plugin

  • Plugin page: custom-advertisem...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: arsh91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,131 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: ▼10.42ms] Passed 4 tests

An overview of server-side resources used by Custom Advertisement Management
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0339.81 ▼4.72
Dashboard /wp-admin3.39 ▼0.0049.50 ▼20.48
Posts /wp-admin/edit.php3.50 ▲0.1051.24 ▼5.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0491.62 ▼11.37
Media Library /wp-admin/upload.php3.31 ▲0.0439.77 ▲0.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Custom Advertisement Management
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.14 ▼0.461.55 ▼0.1943.51 ▼0.48
Dashboard /wp-admin2,210 ▲335.60 ▲0.0782.99 ▼2.4639.63 ▼1.36
Posts /wp-admin/edit.php2,112 ▲121.98 ▲0.0234.73 ▼3.9037.08 ▲1.54
Add New Post /wp-admin/post-new.php1,538 ▲1223.15 ▼0.06652.04 ▼34.9553.45 ▼2.38
Media Library /wp-admin/upload.php1,406 ▲64.20 ▲0.0399.60 ▼7.1045.49 ▲2.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 add_shortcode() in wp-content/plugins/custom-advertisements-management/advertisments.php:243

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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: The official readme.txt is a good inspiration

custom-advertisements-management/advertisments.php 92% from 13 tests

"Custom Advertisement Management" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-advertisements-management.php" instead of "advertisments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin329 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12238212
JavaScript11322100
CSS13017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions10
▷ Named functions10100.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
5 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upload_bak.png0.39KB0.49KB0.00%
images/delete.png0.74KB0.92KB0.00%
images/upload.png3.08KB0.35KB▼ 88.57%
images/add_more.png0.53KB0.62KB0.00%
screenshots/custom_advertisement_management_plugin.png122.77KB32.11KB▼ 73.85%