99% advanced-ads-genesis

Code Review | Ads for Genesis

WordPress plugin Ads for Genesis scored 99% from 54 tests.

About plugin

  • Plugin page: advanced-ads-genesis
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9
  • WordPress version: 5.9.2
  • First release: May 4, 2016
  • Latest release: Feb 2, 2022
  • Number of updates: 29
  • Update frequency: every 72.5 days
  • Top authors: webzunft (89.66%)advancedads (13.79%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 18,501 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼294.23ms] Passed 4 tests

Analyzing server-side resources used by Ads for Genesis
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0254.57 ▲4.86
Dashboard /wp-admin3.44 ▲0.0434.26 ▲0.55
Posts /wp-admin/edit.php3.68 ▲0.0437.12 ▲0.36
Add New Post /wp-admin/post-new.php6.92 ▼0.05104.03 ▼1,178.43
Media Library /wp-admin/upload.php3.33 ▲0.0428.01 ▲0.60

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads for Genesis
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲5915.96 ▼0.096.59 ▼0.182.55 ▼0.46
Dashboard /wp-admin2,913 ▲526.14 ▲0.03118.25 ▼31.28156.32 ▼10.61
Posts /wp-admin/edit.php2,710 ▲223.24 ▲0.0164.19 ▲0.67137.73 ▼6.72
Add New Post /wp-admin/post-new.php1,673 ▼1616.34 ▼5.17425.50 ▼36.35159.44 ▲6.58
Media Library /wp-admin/upload.php1,716 ▲185.54 ▲0.07147.67 ▼2.03188.66 ▼7.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

advanced-ads-genesis/genesis-ads.php 92% from 13 tests

The primary PHP file in "Ads for Genesis" version 1.0.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-ads-genesis.php" instead of "genesis-ads.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
No dangerous file extensions were detected292 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File1181874

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.00
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/genesis.png6.57KB3.18KB▼ 51.56%