83% mif-wp-customizer

Code Review | MIF WP Customizer

WordPress plugin MIF WP Customizer scored 83% from 54 tests.

About plugin

  • Plugin page: mif-wp-customizer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 23, 2018
  • Latest release: Mar 26, 2018
  • Number of updates: 4
  • Update frequency: every 15.7 days
  • Top authors: asergeev34 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 644 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.07ms] Passed 4 tests

An overview of server-side resources used by MIF WP Customizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.16 ▲0.62
Dashboard /wp-admin3.40 ▲0.1045.29 ▼3.45
Posts /wp-admin/edit.php3.52 ▲0.1649.64 ▼0.59
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.76 ▼4.85
Media Library /wp-admin/upload.php3.33 ▲0.1036.20 ▲6.89
WP Customizer /wp-admin/options-general.php?page=mif-wpc3.2932.99

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_mif_wpc_user_login_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for MIF WP Customizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.39 ▼0.991.71 ▼0.0243.40 ▼4.65
Dashboard /wp-admin2,214 ▲264.84 ▼0.06114.45 ▲9.0042.53 ▼2.03
Posts /wp-admin/edit.php2,097 ▲52.03 ▲0.0440.27 ▲1.5235.21 ▼1.10
Add New Post /wp-admin/post-new.php1,536 ▲2218.38 ▲0.61642.73 ▼36.2279.24 ▲24.48
Media Library /wp-admin/upload.php1,393 ▲54.25 ▲0.0394.53 ▼6.0541.05 ▼2.44
WP Customizer /wp-admin/options-general.php?page=mif-wpc8872.1530.1630.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_mif_wpc_user_login_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=mif-wpc
    • > Network (severe)
    https://www.paypalobjects.com/ru_RU/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Plugin configuration page), #2 (Adding menu item "Login/Logout"), #3 (Menu item "Login" (user is not authorized)), #4 (Menu item "Logout" (user is authorized)), #5 (Adding authorization widget), #6 (Authorization widget), #7 ("Up" button), #8 (Site memmbers widget), #9 (Displaying posts for site members in the activity feed of BuddyPress)
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

mif-wp-customizer/mif-wp-customizer.php 92% from 13 tests

The main PHP file in "MIF WP Customizer" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin5,730 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS329182,417
PHP828494482
PO File14647143
JavaScript111617

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity9.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 1.34MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png159.53KB59.09KB▼ 62.96%
screenshot-5.png105.30KB55.65KB▼ 47.15%
screenshot-7.png41.69KB20.34KB▼ 51.21%
screenshot-9.png253.70KB83.93KB▼ 66.92%
screenshot-6.png54.38KB24.61KB▼ 54.75%