83% wp-x-mullet

Code Review | WP X-Mullet

WordPress plugin WP X-Mullet scored83%from 54 tests.

About plugin

  • Plugin page: wp-x-mullet
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Dec 8, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: whyisjake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼2.67ms] Passed 4 tests

A check of server-side resources used by WP X-Mullet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▲2.02
Dashboard /wp-admin3.31 ▼0.0443.55 ▼14.83
Posts /wp-admin/edit.php3.36 ▲0.0146.27 ▲4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.87 ▲1.13
Media Library /wp-admin/upload.php3.23 ▲0.0035.78 ▲0.99

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP X-Mullet
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.121.80 ▲0.1543.72 ▲3.30
Dashboard /wp-admin2,195 ▲155.63 ▼0.0483.14 ▼4.6039.16 ▼2.15
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0238.32 ▲3.3833.27 ▲0.49
Add New Post /wp-admin/post-new.php1,526 ▼022.97 ▲0.14588.68 ▼54.7844.67 ▼21.63
Media Library /wp-admin/upload.php1,391 ▼94.21 ▲0.0595.46 ▼6.9140.59 ▼2.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-x-mullet/tests/bootstrap.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-x-mullet/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-x-mullet/wp-mullet.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-x-mullet/tests/test-sample.php:3

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 90% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Yep, these are the headers.) image required
The official readme.txt is a good inspiration

wp-x-mullet/wp-mullet.php 85% from 13 tests

"WP X-Mullet" version 0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-x-mullet.php" instead of "wp-mullet.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

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
Everything looks great! No dangerous files found in this plugin207 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell120694
JavaScript18144
PHP381023
Markdown111021
XML10014
JSON11011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.69KB19.61KB▼ 66.60%