10% purchase-orders-for-catablog

Code Review | Purchase Order for Catablog - Add Catablog Support for Making Purchase Orders

WordPress plugin Purchase Order for Catablog - Add Catablog Support for Making Purchase Orders scored10%from 54 tests.

About plugin

  • Plugin page: purchase-orders-f...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4
  • WordPress version: 6.3.1
  • First release: Apr 5, 2016
  • Latest release: Apr 5, 2016
  • Number of updates: 3
  • Update frequency: every 18.0 days
  • Top authors: diego2k (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/purchase-orders-for-catablog/lib/ArrayToTextTable.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; ArrayToTextTable has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼51.29ms] Passed 4 tests

An overview of server-side resources used by Purchase Order for Catablog - Add Catablog Support for Making Purchase Orders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.276.23 ▼33.98
Dashboard /wp-admin2.21 ▼1.146.01 ▼49.02
Posts /wp-admin/edit.php2.21 ▼1.157.55 ▼39.26
Add New Post /wp-admin/post-new.php2.21 ▼3.686.65 ▼82.89
Media Library /wp-admin/upload.php2.21 ▼1.025.67 ▼26.66
Catablog Cart Options /wp-admin/admin.php?page=catablog-cart2.217.44

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

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

Browser metrics Passed 4 tests

Purchase Order for Catablog - Add Catablog Support for Making Purchase Orders: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.59 ▼0.845.37 ▲3.4942.57 ▲3.68
Dashboard /wp-admin2,205 ▲205.78 ▼0.0797.78 ▼3.5539.45 ▼4.61
Posts /wp-admin/edit.php2,088 ▼12.05 ▲0.0538.67 ▼6.0834.59 ▼9.72
Add New Post /wp-admin/post-new.php1,539 ▲218.44 ▼4.86653.34 ▼17.6058.46 ▼1.09
Media Library /wp-admin/upload.php1,393 ▲54.16 ▼0.0794.86 ▼5.2841.08 ▼5.02
Catablog Cart Options /wp-admin/admin.php?page=catablog-cart9682.0224.7133.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/purchase-orders-for-catablog/lib/ArrayToTextTable.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; ArrayToTextTable has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=catablog-cart
    • > Deprecated in wp-content/plugins/purchase-orders-for-catablog/lib/ArrayToTextTable.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; ArrayToTextTable has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=catablog-cart
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the catablog-cart-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/purchase-orders-for-catablog/purchase-orders.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: product, spanish, purchase, plugin, admin...

purchase-orders-for-catablog/purchase-orders.php 92% from 13 tests

This is the main PHP file of "Purchase Order for Catablog - Add Catablog Support for Making Purchase Orders" version 0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("purchase-orders-for-catablog.php" instead of "purchase-orders.php")

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
No dangerous file extensions were detected938 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4271194827
PO File1306080
CSS19031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity30.50
▷ Minimum class complexity14.00
▷ Maximum class complexity59.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1735.42%
▷ Public methods3981.25%
▷ Protected methods00.00%
▷ Private methods918.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin