84% wp-metrize-icons

Code Review | WP Metrize Icons

WordPress plugin WP Metrize Icons scored84%from 54 tests.

About plugin

  • Plugin page: wp-metrize-icons
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2013
  • Latest release: Aug 12, 2013
  • Number of updates: 13
  • Update frequency: every 3.5 days
  • Top authors: kalel06 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,188 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.89ms] Passed 4 tests

This is a short check of server-side resources used by WP Metrize Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.04 ▼1.73
Dashboard /wp-admin3.36 ▲0.0650.56 ▼1.62
Posts /wp-admin/edit.php3.41 ▲0.0651.00 ▼1.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.59 ▼5.42
Media Library /wp-admin/upload.php3.28 ▲0.0634.54 ▼2.66

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Metrize Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,359 ▲1,61313.30 ▼0.981.94 ▼0.1738.41 ▼5.74
Dashboard /wp-admin3,758 ▲1,5674.88 ▼1.00109.23 ▲7.0241.13 ▲5.92
Posts /wp-admin/edit.php3,652 ▲1,5602.05 ▲0.0440.25 ▲2.7034.66 ▼1.05
Add New Post /wp-admin/post-new.php3,071 ▲1,55723.36 ▲5.79636.50 ▼36.0962.89 ▲15.00
Media Library /wp-admin/upload.php2,951 ▲1,5604.21 ▼0.0799.26 ▼6.9643.50 ▼4.76

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
Good news, no errors were detected

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-metrize-icons/wpmetrize.php:44

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

wp-metrize-icons/wpmetrize.php 92% from 13 tests

"WP Metrize Icons" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-metrize-icons.php" instead of "wpmetrize.php")

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
No dangerous file extensions were detected7,200 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SVG2005,472
CSS21216980
PHP22162380
JavaScript257351
Markdown17017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
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
js/buttons/btn-icons.png1.28KB0.33KB▼ 74.39%
js/buttons/btn-small.png1.12KB0.26KB▼ 76.75%