89% kpis-cta-buttons

Code Review | KPIS CTA Buttons

WordPress plugin KPIS CTA Buttons scored89%from 54 tests.

About plugin

  • Plugin page: kpis-cta-buttons
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2022
  • Latest release: Oct 7, 2023
  • Number of updates: 28
  • Update frequency: every 12.3 days
  • Top authors: agenciakpis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /417 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.19ms] Passed 4 tests

Server-side resources used by KPIS CTA Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.56 ▲3.67
Dashboard /wp-admin3.35 ▲0.0052.55 ▼11.34
Posts /wp-admin/edit.php3.40 ▲0.0452.47 ▼6.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.12 ▼8.79
Media Library /wp-admin/upload.php3.27 ▲0.0437.48 ▲2.09

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 181 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by KPIS CTA Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4414.74 ▲0.531.85 ▼0.1343.87 ▲5.02
Dashboard /wp-admin2,207 ▲195.04 ▼0.80116.74 ▲13.8875.61 ▲32.00
Posts /wp-admin/edit.php2,105 ▲131.98 ▼0.0535.68 ▼4.9635.19 ▼1.51
Add New Post /wp-admin/post-new.php1,531 ▲1723.25 ▲5.72747.51 ▲66.9754.18 ▼14.52
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.08115.70 ▲12.1477.59 ▲26.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

kpis-cta-buttons/kpis-cta.php 92% from 13 tests

The main PHP script in "KPIS CTA Buttons" version 2.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kpis-cta-buttons.php" instead of "kpis-cta.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin31,945 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP1127,42016,38631,277
Markdown1680214
JavaScript33459194
PO File25659156
CSS130074
JSON10027
SVG3003

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity94.84
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods1,168
▷ Static methods19216.44%
▷ Public methods80468.84%
▷ Protected methods151.28%
▷ Private methods34929.88%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants134
▷ Global constants10276.12%
▷ Class constants3223.88%
▷ Public constants32100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/icono_wp_17x17.png0.61KB0.63KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%