74% easy-ads-manager

Code Review | easy ads manager

WordPress plugin easy ads manager scored74%from 54 tests.

About plugin

  • Plugin page: easy-ads-manager
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Mar 8, 2016
  • Number of updates: 11
  • Update frequency: every 13.3 days
  • Top authors: shokry055 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,713 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼6.24ms] Passed 4 tests

A check of server-side resources used by easy ads manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3437.54 ▲0.66
Dashboard /wp-admin3.52 ▲0.1849.12 ▼8.62
Posts /wp-admin/edit.php3.64 ▲0.2848.52 ▼0.61
Add New Post /wp-admin/post-new.php6.10 ▲0.2281.16 ▼16.39
Media Library /wp-admin/upload.php3.42 ▲0.1937.46 ▲7.48
adverts sections & places /wp-admin/admin.php?page=easy-ads-main-sections3.4236.98
Easy Adverts /wp-admin/admin.php?page=easy-ads3.4336.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_easy_ads_taxnomy_sections_meta
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_easy_ads_wedgite_class
widget_theysaidso_widget

Browser metrics Passed 4 tests

easy ads manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,093 ▲34715.10 ▲0.525.86 ▲4.2143.72 ▲3.42
Dashboard /wp-admin2,371 ▲1946.28 ▲0.63111.62 ▲18.9485.38 ▲39.41
Posts /wp-admin/edit.php2,317 ▲2173.44 ▲1.4146.60 ▲3.5379.77 ▲43.92
Add New Post /wp-admin/post-new.php1,729 ▲20322.52 ▼0.53558.21 ▼131.2427.19 ▼28.20
Media Library /wp-admin/upload.php1,457 ▲604.19 ▲0.0181.18 ▼23.3782.97 ▲36.82
adverts sections & places /wp-admin/admin.php?page=easy-ads-main-sections1,1653.2943.3886.32
Easy Adverts /wp-admin/admin.php?page=easy-ads1,2813.1946.0483.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_easy_ads_taxnomy_sections_meta
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_easy_ads_wedgite_class
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-ads-manager/easy-ads-manager.php
    • > /wp-content/plugins/easy-ads-manager/options_admin.php
    • > /wp-content/plugins/easy-ads-manager/template.php
    • > /wp-content/plugins/easy-ads-manager/easy-ads-functions.php

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 97% 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 your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === easy-ads-manager === )
The official readme.txt is a good inspiration

easy-ads-manager/easy-ads-manager.php Passed 13 tests

"easy ads manager" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
95 characters long description:
easy ads is a free advertisement plugin to manage , add and remove ads easily way to 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
There were no executable files found in this plugin2,066 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP42453856
CSS4220646
PO File2210218472
JavaScript301092

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.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
4 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/har.png17.47KB0.12KB▼ 99.33%
imgs/icon.png18.02KB0.10KB▼ 99.43%
imgs/no.png19.26KB7.06KB▼ 63.34%
imgs/ver.png17.47KB0.12KB▼ 99.32%