79% ads-master

Code Review | Ads Master

WordPress plugin Ads Master scored 79% 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: 5.9.2
  • 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

200+ active / 7,350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.31MB] [CPU: ▼327.88ms] Passed 4 tests

An overview of server-side resources used by Ads Master
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▼0.0249.55 ▼14.43
Dashboard /wp-admin3.46 ▲0.0536.51 ▼6.60
Posts /wp-admin/edit.php3.68 ▲0.0440.42 ▼3.40
Add New Post /wp-admin/post-new.php5.68 ▼1.3057.87 ▼1,287.07
Media Library /wp-admin/upload.php3.33 ▲0.0476.48 ▲50.59
Ads Master /wp-admin/options-general.php?page=ads-master3.3225.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 2 new options
New WordPress options
recovery_mode_email_last_sent
widget_ads_master_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ads Master
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲4815.93 ▼0.066.64 ▲0.142.67 ▼0.10
Dashboard /wp-admin2,899 ▲486.17 ▲0.03119.68 ▼20.13156.43 ▼7.13
Posts /wp-admin/edit.php2,695 ▲43.24 ▲0.0072.66 ▲9.24188.37 ▲48.11
Add New Post /wp-admin/post-new.php1,724 ▲6322.03 ▲4.68423.88 ▼5.19164.49 ▼45.16
Media Library /wp-admin/upload.php1,705 ▲45.55 ▲0.06147.85 ▲2.01190.11 ▼4.23
Ads Master /wp-admin/options-general.php?page=ads-master8361.9736.1575.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • recovery_mode_email_last_sent
    • widget_ads_master_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > 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
The following issues need your attention
  • 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
No browser errors were detected

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 adsence, post display google ads, google advertisment, google ads, ads

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

"Ads Master" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin437 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36115350
CSS13087

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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-1.png28.29KB16.40KB▼ 42.01%
screenshot-2.png55.54KB31.58KB▼ 43.14%