84% magic-pipe

Code Review | Magic Pipe

WordPress plugin Magic Pipe scored84%from 54 tests.

About plugin

  • Plugin page: magic-pipe
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Nov 6, 2021
  • Latest release: Nov 6, 2021
  • Number of updates: 7
  • Update frequency: every 11.4 days
  • Top authors: sunukunsinje (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 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.01MB] [CPU: ▼4.84ms] Passed 4 tests

An overview of server-side resources used by Magic Pipe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.14 ▼6.93
Dashboard /wp-admin3.31 ▲0.0151.48 ▼3.21
Posts /wp-admin/edit.php3.36 ▲0.0147.12 ▼5.57
Add New Post /wp-admin/post-new.php5.89 ▲0.01102.89 ▲5.09
Media Library /wp-admin/upload.php3.23 ▲0.0136.48 ▼3.64

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
magicpipe_options
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Magic Pipe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.54 ▼0.916.36 ▲4.5850.14 ▲4.05
Dashboard /wp-admin2,211 ▲235.83 ▼0.07103.89 ▼4.8378.50 ▲39.76
Posts /wp-admin/edit.php2,103 ▲141.99 ▼0.0636.60 ▼2.2633.30 ▼1.56
Add New Post /wp-admin/post-new.php1,683 ▲16922.41 ▲4.94726.05 ▲52.5953.77 ▲0.08
Media Library /wp-admin/upload.php1,405 ▲144.12 ▼0.06108.28 ▼12.1947.11 ▼3.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/magic-pipe/magicpipe.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: youtube, video gallery, pagination

magic-pipe/magicpipe.php 92% from 13 tests

Analyzing the main PHP file in "Magic Pipe" version 1.0.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("magic-pipe.php" instead of "magicpipe.php")

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
No dangerous file extensions were detected4,782 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS56811423,604
JavaScript6161131947
PHP27010231

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jpages/img/magicpipe.png0.70KB0.73KB0.00%
jpages/img/preload.png0.83KB0.40KB▼ 51.24%