94% gamipress-advanced-ads-integration

Code Review | GamiPress - Advanced Ads integration

WordPress plugin GamiPress - Advanced Ads integration scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-advance...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Jul 21, 2021
  • Latest release: Jan 24, 2022
  • Number of updates: 3
  • Update frequency: every 62.4 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 310 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼299.77ms] Passed 4 tests

An overview of server-side resources used by GamiPress - Advanced Ads integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0656.52 ▲6.18
Dashboard /wp-admin3.43 ▲0.0232.89 ▼0.25
Posts /wp-admin/edit.php3.66 ▲0.0237.20 ▼1.43
Add New Post /wp-admin/post-new.php6.90 ▼0.0788.88 ▼1,196.64
Media Library /wp-admin/upload.php3.32 ▲0.0224.26 ▼0.77

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

GamiPress - Advanced Ads integration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲6915.93 ▲0.165.73 ▲0.012.11 ▼0.31
Dashboard /wp-admin2,919 ▲616.14 ▼0.09119.85 ▼14.86155.41 ▼6.06
Posts /wp-admin/edit.php2,719 ▲313.24 ▲0.1964.97 ▲0.38140.44 ▲2.59
Add New Post /wp-admin/post-new.php1,680 ▼1017.26 ▼3.68420.85 ▼14.96167.34 ▲7.43
Media Library /wp-admin/upload.php1,726 ▲255.52 ▲0.03141.61 ▼1.33186.75 ▲5.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-advanced-ads-integration/gamipress-advanced-ads.php:213

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

gamipress-advanced-ads-integration/gamipress-advanced-ads.php 92% from 13 tests

The principal PHP file in "GamiPress - Advanced Ads integration" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gamipress-advanced-ads-integration.php" instead of "gamipress-advanced-ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin160 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP477184160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin