79% ads-master

Code Review | Ads Master

WordPress plugin Ads Master scored79%from 54 tests.

About plugin

  • Plugin page: ads-master
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 28, 2016
  • Latest release: Aug 20, 2018
  • Number of updates: 15
  • Update frequency: every 46.1 days
  • Top authors: maghodiya.paresh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,856 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.30MB] [CPU: ▼17.38ms] Passed 4 tests

This is a short check of server-side resources used by Ads Master
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0032.18 ▼9.07
Dashboard /wp-admin3.34 ▲0.0448.59 ▼5.34
Posts /wp-admin/edit.php3.39 ▲0.0449.01 ▼3.55
Add New Post /wp-admin/post-new.php4.63 ▼1.2543.08 ▼51.54
Media Library /wp-admin/upload.php3.26 ▲0.0438.66 ▲2.53
Ads Master /wp-admin/options-general.php?page=ads-master3.2531.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_ads_master_widget
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by Ads Master
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▲0.031.75 ▲0.0542.54 ▼0.29
Dashboard /wp-admin2,204 ▲305.61 ▲0.0183.05 ▼17.8737.03 ▼6.09
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0237.29 ▲2.1136.67 ▼0.24
Add New Post /wp-admin/post-new.php1,533 ▲723.13 ▼0.55669.94 ▼32.8558.13 ▲4.02
Media Library /wp-admin/upload.php1,397 ▼34.22 ▲0.0998.03 ▼15.8847.10 ▼2.78
Ads Master /wp-admin/options-general.php?page=ads-master6871.456.9817.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_ads_master_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ads-master
    • > Parse error in wp-content/plugins/ads-master/ads_master_core.php+245
    syntax error, unexpected end of file

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/ads-master/ads_master_core.php on line 245

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: google advertisment, google ads, ads, post display google ads, google adsence

ads-master/ads-master.php Passed 13 tests

The primary PHP file in "Ads Master" version 1.0.1 is used by WordPress to initiate all plugin functionality
48 characters long description:
This plugin used to display ads in your website.

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
Good job! No executable or dangerous file extensions detected437 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36115350
CSS13087

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png55.54KB31.58KB▼ 43.14%
screenshot-1.png28.29KB16.40KB▼ 42.01%