77% morphii

Code Review | Morphii

WordPress plugin Morphii scored77%from 54 tests.

About plugin

  • Plugin page: morphii
  • Plugin version: 2.0
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2022
  • Latest release: Apr 7, 2023
  • Number of updates: 53
  • Update frequency: every 9.0 days
  • Top authors: morphii (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▲11.59ms] Passed 4 tests

Server-side resources used by Morphii
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2156.13 ▲15.98
Dashboard /wp-admin3.53 ▲0.2362.22 ▲9.25
Posts /wp-admin/edit.php3.63 ▲0.2868.19 ▲17.65
Add New Post /wp-admin/post-new.php6.24 ▲0.3692.38 ▲3.58
Media Library /wp-admin/upload.php3.47 ▲0.2455.38 ▲17.53
Settings /wp-admin/admin.php?page=morphii-settings3.6254.00
Morphii Reviews /wp-admin/admin.php?page=morphii-reviews3.5452.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 1,028 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Morphii: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.55 ▼0.823.49 ▲1.7435.51 ▼7.45
Dashboard /wp-admin2,267 ▲795.25 ▼0.66113.34 ▼2.9342.05 ▼0.47
Posts /wp-admin/edit.php2,155 ▲662.40 ▲0.3843.12 ▲4.9833.99 ▼0.65
Add New Post /wp-admin/post-new.php1,564 ▲4521.17 ▼2.28717.13 ▲5.3938.88 ▼14.17
Media Library /wp-admin/upload.php1,446 ▲554.68 ▲0.48109.26 ▲7.0048.31 ▲3.28
Settings /wp-admin/admin.php?page=morphii-settings1,2852.2048.6428.80
Morphii Reviews /wp-admin/admin.php?page=morphii-reviews9862.0129.6327.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/morphii/includes/class.morphii-data.php
    • > /wp-content/plugins/morphii/assets/libs/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/morphii/includes/class.morphii-questions-table.php
    • > /wp-content/plugins/morphii/includes/class.morphii-list-table.php
    • > /wp-content/plugins/morphii/includes/class.morphii-shortcode.php
  • 343× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(wp-content/plugins/morphii/assets/libs/vendor/markbaker/matrix/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/morphii/assets/libs/vendor/markbaker/matrix/examples/test.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Html' not found in wp-content/plugins/morphii/assets/libs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/morphii/assets/libs/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/morphii/assets/libs/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Strategy_Composite' not found in wp-content/plugins/morphii/assets/libs/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/morphii/assets/libs/vendor/maennchen/zipstream-php/src/Exception/IncompatibleOptionsException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/morphii/assets/libs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/morphii/assets/libs/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\BaseParserClass' not found in wp-content/plugins/morphii/assets/libs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_ChildDef' not found in wp-content/plugins/morphii/assets/libs/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #9 in morphii/assets to your readme.txt
You can look at the official readme.txt

morphii/morphii-init.php 92% from 13 tests

The main PHP script in "Morphii" version 2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("morphii.php" instead of "morphii-init.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected98,052 lines of code in 824 files:
LanguageFilesBlank linesComment linesLines of code
PHP77119,81250,64194,148
Markdown2250601,375
JSON14001,236
JavaScript44061785
YAML5510237
CSS3161165
XML4204105
INI1111

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,011)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.37
▷ Minimum class complexity1.00
▷ Maximum class complexity1,011.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces84
Interfaces27
Traits0
Classes713
▷ Abstract classes425.89%
▷ Concrete classes67194.11%
▷ Final classes40.60%
Methods5,273
▷ Static methods1,59630.27%
▷ Public methods3,96575.19%
▷ Protected methods2634.99%
▷ Private methods1,04519.82%
Functions84
▷ Named functions4857.14%
▷ Anonymous functions3642.86%
Constants1,151
▷ Global constants141.22%
▷ Class constants1,13798.78%
▷ Public constants1,06293.40%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected