84% metype

Code Review | Metype

WordPress plugin Metype scored 84% from 54 tests.

About plugin

  • Plugin page: metype
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 3, 2018
  • Latest release: Jul 17, 2019
  • Number of updates: 7
  • Update frequency: every 67.6 days
  • Top authors: metypedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 803 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.00ms] Passed 4 tests

Analyzing server-side resources used by Metype
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.25 ▲3.32
Dashboard /wp-admin3.33 ▲0.0243.87 ▼7.06
Posts /wp-admin/edit.php3.38 ▲0.0246.72 ▲1.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.55 ▼12.14
Media Library /wp-admin/upload.php3.25 ▲0.0232.63 ▼2.40
All Comments /wp-admin/edit-comments.php3.2637.92

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
metype-font-color
widget_recent-posts
widget_theysaidso_widget
metype-bg-color
db_upgraded
can_compress_scripts
metype-feed-widget-active
widget_recent-comments
metype-primary-color

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metype
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.20 ▲0.0014.87 ▲13.1942.79 ▲3.94
Dashboard /wp-admin2,189 ▲15.85 ▼0.05106.60 ▼11.0139.18 ▼7.23
Posts /wp-admin/edit.php2,072 ▼172.06 ▲0.0039.23 ▲4.7834.12 ▼0.12
Add New Post /wp-admin/post-new.php1,504 ▼1517.72 ▼5.66662.58 ▼6.8850.41 ▼2.43
Media Library /wp-admin/upload.php1,371 ▼174.20 ▼0.0194.01 ▼5.2040.69 ▼9.24
All Comments /wp-admin/edit-comments.php1,7772.3036.0632.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • metype-bg-color
    • metype-primary-color
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • metype-feed-widget-active
    • db_upgraded
    • metype-font-color
    • 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
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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/metype/metype-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/metype/metype-comment-widget-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metype/metype.php:58

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: comments, freedom of speech, spam, conversations, engagement...

metype/metype.php 92% from 13 tests

"Metype" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

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 plugin176 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP32324102
JavaScript410051
CSS24023

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 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
PNG images were not found in this plugin