83% merch-systems

Code Review | merch.systems

WordPress plugin merch.systems scored 83% from 54 tests.

About plugin

  • Plugin page: merch-systems
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Oct 14, 2019
  • Latest release: Feb 9, 2021
  • Number of updates: 22
  • Update frequency: every 22.1 days
  • Top authors: anti-design.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.39ms] Passed 4 tests

A check of server-side resources used by merch.systems
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1636.43 ▼7.42
Dashboard /wp-admin3.51 ▲0.2144.97 ▼4.26
Posts /wp-admin/edit.php3.56 ▲0.2141.37 ▼7.76
Add New Post /wp-admin/post-new.php6.03 ▲0.1485.35 ▼10.10
Media Library /wp-admin/upload.php3.37 ▲0.1435.33 ▼0.57

Server storage [IO: ▲0.19MB] [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: 58 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for merch.systems
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.29 ▼1.461.56 ▼0.2440.45 ▼8.18
Dashboard /wp-admin2,220 ▲325.91 ▲1.0793.49 ▼10.9773.40 ▲26.41
Posts /wp-admin/edit.php2,103 ▲142.00 ▲0.0234.87 ▼4.5130.90 ▼2.97
Add New Post /wp-admin/post-new.php1,523 ▼1917.64 ▼0.77720.01 ▲102.7165.02 ▲12.36
Media Library /wp-admin/upload.php1,402 ▲144.25 ▲0.04112.42 ▲12.6743.29 ▲0.41

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Source' not found in wp-content/plugins/merch-systems/includes/Mustache/Source/FilesystemSource.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/merch-systems/includes/Mustache/Loader/FilesystemLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Cache_AbstractCache' not found in wp-content/plugins/merch-systems/includes/Mustache/Cache/NoopCache.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/merch-systems/includes/Mustache/Exception/RuntimeException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/merch-systems/includes/Mustache/Logger/AbstractLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Cache' not found in wp-content/plugins/merch-systems/includes/Mustache/Cache/AbstractCache.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Cache_AbstractCache' not found in wp-content/plugins/merch-systems/includes/Mustache/Cache/FilesystemCache.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/merch-systems/includes/Merchsys_Settings.php:205
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/merch-systems/includes/Mustache/Exception/UnknownHelperException.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/merch-systems/includes/Merchsys.php:7

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 88% 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:
  • Requires php: Version format is invalid
  • Plugin Name: You should set the name of your plugin on the first line ( === merch-systems === )
The official readme.txt might help

merch-systems/merchsys.php 92% from 13 tests

"merch.systems" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("merch-systems.php" instead of "merchsys.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,973 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP516362,5572,869
PO File199167103
Mustache1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.29
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes42
▷ Abstract classes49.52%
▷ Concrete classes3890.48%
▷ Final classes00.00%
Methods234
▷ Static methods166.84%
▷ Public methods17072.65%
▷ Protected methods156.41%
▷ Private methods4920.94%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants77
▷ Global constants00.00%
▷ Class constants77100.00%
▷ Public constants77100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png2.88KB1.61KB▼ 44.21%