78% minicomposer

Code Review | MiniComposer

WordPress plugin MiniComposer scored78%from 54 tests.

About plugin

  • Plugin page: minicomposer
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 17, 2015
  • Latest release: Nov 16, 2018
  • Number of updates: 80
  • Update frequency: every 13.3 days
  • Top authors: crazypsycho (82.5%)rtowebsites (18.75%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.52MB] [CPU: ▼11.85ms] Passed 4 tests

Server-side resources used by MiniComposer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.65 ▼6.42
Dashboard /wp-admin3.36 ▲0.0645.54 ▼2.56
Posts /wp-admin/edit.php3.48 ▲0.1249.61 ▲4.22
Add New Post /wp-admin/post-new.php3.55 ▼2.3358.39 ▼42.63
Media Library /wp-admin/upload.php3.29 ▲0.0639.14 ▲5.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for MiniComposer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,464 ▲72919.31 ▲4.9485.92 ▲83.9744.94 ▲2.05
Dashboard /wp-admin2,244 ▲564.96 ▲0.08106.14 ▼0.2640.44 ▼0.46
Posts /wp-admin/edit.php2,132 ▲432.30 ▲0.2538.75 ▲0.2734.06 ▲1.18
Add New Post /wp-admin/post-new.php4,078 ▲2,5439.60 ▼13.49257.00 ▼414.5270.82 ▲19.67
Media Library /wp-admin/upload.php1,429 ▲474.37 ▲0.1698.97 ▲1.4642.57 ▼1.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/minicomposer/public/partials/minicomposer-public-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/minicomposer/admin/partials/minicomposer-admin-display.php:16
    • > PHP Warning
      include(): Failed opening 'inline-edit.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/minicomposer/public/partials/minicomposer-public-display.php on line 15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/minicomposer/admin/partials/minicomposer-admin-display-base.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/minicomposer/public/partials/inline-edit.inc.php:8
    • > PHP Warning
      include(inline-edit.php): failed to open stream: No such file or directory in wp-content/plugins/minicomposer/public/partials/minicomposer-public-display.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === minicomposer === )
  • Donate link: Please fix this invalid URI: "MiniComposer"
The official readme.txt might help

minicomposer/minicomposer.php Passed 13 tests

The main PHP file in "MiniComposer" ver. 1.6.1 adds more information about the plugin and also serves as the entry point for this plugin
27 characters long description:
Layout page builder plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,512 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP254719331,723
JavaScript93164321,093
CSS312831597
PO File129068
JSON30031

PHP code Passed 2 tests

This is a very shot review of 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.42
Average class complexity19.71
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods90
▷ Static methods77.78%
▷ Public methods8291.11%
▷ Protected methods11.11%
▷ Private methods77.78%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
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
public/img/edit-pen.png0.38KB0.32KB▼ 16.84%