83% mp-easy-icons

Code Review | MP Easy Icons

WordPress plugin MP Easy Icons scored83%from 54 tests.

About plugin

  • Plugin page: mp-easy-icons
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 18, 2015
  • Latest release: Mar 5, 2018
  • Number of updates: 19
  • Update frequency: every 57.0 days
  • Top authors: johnstonphilip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /4,957 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▲339.55ms] 75% from 4 tests

Server-side resources used by MP Easy Icons
The following require your attention
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 339.55ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.67 ▼1.57
Dashboard /wp-admin3.49 ▲0.19502.93 ▲449.86
Posts /wp-admin/edit.php3.54 ▲0.18492.99 ▲440.89
Add New Post /wp-admin/post-new.php6.01 ▲0.11568.60 ▲469.03
Media Library /wp-admin/upload.php3.35 ▲0.12523.77 ▲493.02

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

MP Easy Icons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.70 ▲0.391.74 ▼0.2041.24 ▼5.27
Dashboard /wp-admin2,218 ▲415.64 ▲0.1086.23 ▼14.4842.39 ▼13.34
Posts /wp-admin/edit.php2,128 ▲282.01 ▲0.0538.03 ▼5.6739.26 ▲4.84
Add New Post /wp-admin/post-new.php1,548 ▲2023.65 ▲0.50694.84 ▲10.1655.76 ▲9.69
Media Library /wp-admin/upload.php1,428 ▲314.22 ▼0.0899.10 ▼2.4642.52 ▼3.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-easy-icons/includes/misc-functions/enqueue-scripts.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-easy-icons/includes/plugin-checker/class-plugin-checker.php:862
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mp-easy-icons/includes/plugin-checker/included-plugins/mp-core-check.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mp-easy-icons/mp-easy-icons.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mp-easy-icons/includes/misc-functions/icon-creator.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: icons, tinymce

mp-easy-icons/mp-easy-icons.php 77% from 13 tests

"MP Easy Icons" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,405 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS30284,673
SVG2001,054
PHP8379633641
Markdown120037

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity37.50
▷ Minimum class complexity21.00
▷ Maximum class complexity54.00
Average method complexity7.08
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png83.60KB39.77KB▼ 52.43%