83% accept-coin

Code Review | Acceptcoin

WordPress plugin Acceptcoin scored83%from 54 tests.

About plugin

  • Plugin page: accept-coin
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2023
  • Latest release: Nov 8, 2023
  • Number of updates: 13
  • Update frequency: every 34.0 days
  • Top authors: acceptcoin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.21ms] Passed 4 tests

An overview of server-side resources used by Acceptcoin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.62 ▼5.24
Dashboard /wp-admin3.37 ▲0.0646.58 ▲3.37
Posts /wp-admin/edit.php3.49 ▲0.1252.42 ▲8.25
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.81 ▼0.24
Media Library /wp-admin/upload.php3.30 ▲0.0635.07 ▲1.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Acceptcoin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.21 ▼0.141.72 ▼0.3840.44 ▼2.99
Dashboard /wp-admin2,198 ▲215.60 ▼0.0393.50 ▲7.0743.46 ▲7.44
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0538.54 ▼2.1236.94 ▼0.34
Add New Post /wp-admin/post-new.php1,535 ▲925.05 ▲1.83593.47 ▼29.8979.02 ▲30.17
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0696.70 ▼2.6541.11 ▼0.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/accept-coin/AcceptCoinPaymentGateway.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Coming soon)
The official readme.txt is a good inspiration

accept-coin/accept-coin.php 69% from 13 tests

"Acceptcoin" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "6.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,168 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP182624701,089
SVG10131
CSS13027
JSON20012
JavaScript1469

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.17
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods54
▷ Static methods2444.44%
▷ Public methods5194.44%
▷ Protected methods00.00%
▷ Private methods35.56%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants981.82%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.65MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250-rtl.png87.05KB32.95KB▼ 62.15%
assets/icon-256x256.png19.46KB9.51KB▼ 51.11%
assets/banner-1544x500.png231.61KB86.73KB▼ 62.55%
assets/banner-1544x500-rtl.png231.61KB86.73KB▼ 62.55%
assets/banner-772x250.png87.05KB32.95KB▼ 62.15%