83% demomentsomtres-order-shortcodes

Code Review | DeMomentSomTres Order Shortcodes

WordPress plugin DeMomentSomTres Order Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-o...
  • Plugin version: 20200224...
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: Feb 25, 2020
  • Number of updates: 5
  • Update frequency: every 5.8 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by DeMomentSomTres Order Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.56 ▼8.28
Dashboard /wp-admin3.31 ▲0.0148.87 ▼10.55
Posts /wp-admin/edit.php3.36 ▲0.0045.39 ▼6.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.20 ▼11.42
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▼2.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for DeMomentSomTres Order Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.391.75 ▼0.1243.29 ▲4.24
Dashboard /wp-admin2,192 ▲155.51 ▼0.1588.45 ▼1.1240.90 ▼3.28
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0337.58 ▼0.8637.27 ▼0.16
Add New Post /wp-admin/post-new.php1,531 ▲323.04 ▼0.36690.54 ▲44.4549.15 ▼4.84
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0397.41 ▼13.7144.14 ▼3.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/demomentsomtres-order-shortcodes/dms3-order-shortcodes.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: orders, woocommerce

demomentsomtres-order-shortcodes/dms3-order-shortcodes.php 69% from 13 tests

Analyzing the main PHP file in "DeMomentSomTres Order Shortcodes" version 20200224...
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("demomentsomtres-order-shortcodes.php" instead of "dms3-order-shortcodes.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
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "20200224...")

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
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112863

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin