89% wpc-buy-now-button

Code Review | WPC Buy Now Button for WooCommerce

WordPress plugin WPC Buy Now Button for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wpc-buy-now-button
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 29
  • Update frequency: every 28.5 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

5,000+ active /33,746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by WPC Buy Now Button for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.45 ▼2.43
Dashboard /wp-admin3.33 ▲0.0247.21 ▼1.82
Posts /wp-admin/edit.php3.44 ▲0.0847.08 ▼4.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.84 ▼2.24
Media Library /wp-admin/upload.php3.25 ▲0.0233.29 ▲0.15
About /wp-admin/admin.php?page=wpclever3.2130.83
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.5630.07

Server storage [IO: ▲0.07MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Buy Now Button for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14114.67 ▲0.262.09 ▲0.4145.27 ▲5.07
Dashboard /wp-admin2,275 ▲985.67 ▲0.0382.59 ▼29.7290.89 ▲43.04
Posts /wp-admin/edit.php2,178 ▲782.01 ▼0.0137.12 ▼1.7035.43 ▲0.48
Add New Post /wp-admin/post-new.php1,753 ▲22722.04 ▼1.07688.20 ▼47.2043.70 ▼14.16
Media Library /wp-admin/upload.php1,477 ▲774.14 ▼0.0594.11 ▼13.2872.13 ▲24.60
About /wp-admin/admin.php?page=wpclever1,4052.1430.3734.59
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7322.1332.6557.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

wpc-buy-now-button/wpc-buy-now-button.php 92% from 13 tests

"WPC Buy Now Button for WooCommerce" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)

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
Everything looks great! No dangerous files found in this plugin1,368 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP512426815
CSS3766409
JavaScript4223115
SVG10029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.25
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods38.33%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants8
▷ Global constants8100.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 files were detected