78% podamibe-2checkout

Code Review | Podamibe 2Checkout

WordPress plugin Podamibe 2Checkout scored78%from 54 tests.

About plugin

  • Plugin page: podamibe-2checkout
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Jan 16, 2017
  • Latest release: May 22, 2019
  • Number of updates: 12
  • Update frequency: every 71.1 days
  • Top authors: podamibe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,294 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 gracefully, with no errors

Server metrics [RAM: ▲0.45MB] [CPU: ▼2.19ms] Passed 4 tests

An overview of server-side resources used by Podamibe 2Checkout
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4638.16 ▲1.85
Dashboard /wp-admin3.76 ▲0.4145.70 ▼11.20
Posts /wp-admin/edit.php3.87 ▲0.5146.37 ▲0.30
Add New Post /wp-admin/post-new.php6.36 ▲0.4789.58 ▲0.44
Media Library /wp-admin/upload.php3.68 ▲0.4538.03 ▲1.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Podamibe 2Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲14813.44 ▼0.9111.66 ▲9.9538.94 ▼7.84
Dashboard /wp-admin2,217 ▲425.58 ▼0.1480.32 ▼18.4982.34 ▲38.40
Posts /wp-admin/edit.php2,119 ▲192.05 ▲0.0239.84 ▲4.0338.06 ▲1.84
Add New Post /wp-admin/post-new.php1,705 ▲17924.39 ▲1.31737.65 ▲47.3949.96 ▲0.50
Media Library /wp-admin/upload.php1,416 ▲134.25 ▲0.05103.09 ▼7.0572.55 ▲27.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/podamibe-2checkout/2checkout.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/podamibe-2checkout/inc/functions.php:102

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)
No browser issues were found

Optimizations

Plugin configuration 90% 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 your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

podamibe-2checkout/2checkout.php 85% from 13 tests

The entry point to "Podamibe 2Checkout" version 1.0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("podamibe-2checkout.php" instead of "2checkout.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 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 plugin1,769 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP101461741,472
CSS2134161
JavaScript32630136

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity20.75
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods411.11%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/2checkout.png16.13KB1.19KB▼ 92.62%
images/2checkout22.png15.93KB1.20KB▼ 92.50%