84% qmoney

Code Review | QMoney

WordPress plugin QMoney scored84%from 54 tests.

About plugin

  • Plugin page: qmoney
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2+
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Apr 12, 2021
  • Number of updates: 9
  • Update frequency: every 29.2 days
  • Top authors: qcellswat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /370 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by QMoney
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.59 ▲0.68
Dashboard /wp-admin3.34 ▼0.0055.07 ▼5.70
Posts /wp-admin/edit.php3.39 ▲0.0452.03 ▲5.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.51 ▼19.81
Media Library /wp-admin/upload.php3.27 ▲0.0433.23 ▼1.87

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for QMoney
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.071.74 ▲0.2347.15 ▲5.28
Dashboard /wp-admin2,206 ▲184.85 ▼1.03113.16 ▲6.6744.45 ▲3.39
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0433.98 ▼5.9931.00 ▼7.23
Add New Post /wp-admin/post-new.php1,533 ▲422.82 ▲4.50644.13 ▼13.9257.55 ▲1.99
Media Library /wp-admin/upload.php1,388 ▼04.25 ▼0.0195.57 ▼4.7041.19 ▼4.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/qmoney/qmoney-payment.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: qmoney, gambia, qcell, ecommerce gambia, kod...

qmoney/qmoney-payment.php 85% from 13 tests

The entry point to "QMoney" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("qmoney.php" instead of "qmoney-payment.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected222 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16353222

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qmoney-logo.png9.76KB3.71KB▼ 62.00%
assets/qmoney-logo.png9.76KB3.71KB▼ 62.00%