83% phanes-payments

Code Review | Phanes Payments

WordPress plugin Phanes Payments scored83%from 54 tests.

About plugin

  • Plugin page: phanes-payments
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 30, 2017
  • Latest release: Sep 27, 2021
  • Number of updates: 37
  • Update frequency: every 42.7 days
  • Top authors: phanesco (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,876 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.92ms] Passed 4 tests

A check of server-side resources used by Phanes Payments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.31 ▼2.54
Dashboard /wp-admin3.31 ▲0.0144.94 ▼6.68
Posts /wp-admin/edit.php3.36 ▲0.0046.82 ▲1.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.09 ▼3.56
Media Library /wp-admin/upload.php3.23 ▲0.0034.16 ▼2.90

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Phanes Payments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.16 ▼1.435.31 ▲3.4141.44 ▼0.19
Dashboard /wp-admin2,206 ▲285.80 ▲0.8593.63 ▼13.0839.15 ▼1.16
Posts /wp-admin/edit.php2,092 ▲62.02 ▲0.0139.13 ▲0.9735.95 ▲0.92
Add New Post /wp-admin/post-new.php1,514 ▼1017.51 ▼5.76609.17 ▼80.1851.05 ▼17.97
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0492.89 ▼1.0943.90 ▲2.23

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/phanes-payments/includes/admin/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/phanes-payments/includes/admin/hooks.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/phanes-payments/includes/hooks.php:4

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

phanes-payments/phanes-payment-gateway.php 85% from 13 tests

The entry point to "Phanes Payments" version 3.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("phanes-payments.php" instead of "phanes-payment-gateway.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected762 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP599175470
JavaScript12017151
CSS14395
Markdown120045
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity14.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%
Functions15
▷ Named functions1280.00%
▷ Anonymous functions320.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons8_copy_20px.png0.40KB0.39KB▼ 2.46%
assets/phanes-icon.png1.72KB0.25KB▼ 85.61%
assets/phuck-icon.png1.72KB0.50KB▼ 70.73%
assets/where-to-buy-phuck.png7.98KB2.89KB▼ 63.80%