89% okiano-advertising-for-google-ads

Code Review | Okiano Google Ads

WordPress plugin Okiano Google Ads scored 89% from 54 tests.

About plugin

  • Plugin page: okiano-advertisin...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.8.1
  • WordPress version: 5.8.1
  • First release: Apr 25, 2021
  • Latest release: Sep 26, 2021
  • Number of updates: 22
  • Update frequency: every 7.1 days
  • Top authors: okiano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 266 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 gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼178.09ms] Passed 4 tests

A check of server-side resources used by Okiano Google Ads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1546.36 ▲7.74
Dashboard /wp-admin3.28 ▲0.2258.01 ▼9.91
Posts /wp-admin/edit.php3.33 ▲0.2357.25 ▲6.34
Add New Post /wp-admin/post-new.php5.57 ▲0.14102.89 ▼705.38
Media Library /wp-admin/upload.php3.16 ▲0.1641.59 ▼3.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 1 new option
New WordPress options
woocommerce_okn_wcintegration_settings

Browser metrics Passed 4 tests

Okiano Google Ads: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲14515.98 ▲0.468.27 ▼5.8946.15 ▼0.79
Dashboard /wp-admin2,998 ▲645.98 ▲0.02159.41 ▼2.34145.10 ▲29.15
Posts /wp-admin/edit.php2,793 ▲542.74 ▲0.0270.88 ▲4.2690.04 ▼8.11
Add New Post /wp-admin/post-new.php1,645 ▲5421.60 ▲2.79314.79 ▼118.64110.36 ▼10.30
Media Library /wp-admin/upload.php1,789 ▼185.05 ▲0.02147.25 ▼37.39148.28 ▲23.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • woocommerce_okn_wcintegration_settings

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 26 tag instead of maximum 10
You can look at the official readme.txt

okiano-advertising-for-google-ads/okiano-advertising-for-google-ads.php 85% from 13 tests

The main PHP script in "Okiano Google Ads" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.7" instead of "2.2")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,027 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP18259551928
CSS110064
JavaScript11122
JSON20012
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods72
▷ Static methods2433.33%
▷ Public methods6894.44%
▷ Protected methods00.00%
▷ Private methods45.56%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants20
▷ Global constants1785.00%
▷ Class constants315.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
okiano-google-ads-transparent.png14.02KB5.37KB▼ 61.72%