83% melascrivi

Code Review | melascrivi-plugin

WordPress plugin melascrivi-plugin scored 83% from 54 tests.

About plugin

  • Plugin page: melascrivi
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2013
  • Latest release: Nov 6, 2015
  • Number of updates: 26
  • Update frequency: every 48.0 days
  • Top authors: melascrivi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 1,929 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.13MB] [CPU: ▼3.83ms] Passed 4 tests

An overview of server-side resources used by melascrivi-plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.76 ▼9.54
Dashboard /wp-admin3.47 ▲0.1745.78 ▼3.27
Posts /wp-admin/edit.php3.52 ▲0.1750.05 ▲3.31
Add New Post /wp-admin/post-new.php6.06 ▲0.1791.97 ▼5.80
Media Library /wp-admin/upload.php3.40 ▲0.1735.25 ▲3.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 543 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for melascrivi-plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.63 ▼0.951.92 ▼0.0339.00 ▼2.28
Dashboard /wp-admin2,220 ▲355.84 ▼0.0298.65 ▼2.1585.94 ▲41.76
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0438.66 ▼2.4536.63 ▲1.68
Add New Post /wp-admin/post-new.php1,533 ▼018.35 ▼4.78683.38 ▼0.2656.74 ▲0.72
Media Library /wp-admin/upload.php1,402 ▲204.19 ▲0.0392.47 ▼12.1671.99 ▲29.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/melascrivi/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/melascrivi/admin_init.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/melascrivi/melascrivi_plugin.php:15

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === melascrivi === )
The official readme.txt is a good inspiration

melascrivi/melascrivi_plugin.php 92% from 13 tests

The principal PHP file in "melascrivi-plugin" v. 1.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("melascrivi.php" instead of "melascrivi_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin13,099 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript91,2535,7795,388
PHP45721093,645
CSS114534023,155
PO File2414414911

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4591.84%
▷ Protected methods36.12%
▷ Private methods12.04%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants642.86%
▷ Class constants857.14%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
475 PNG files occupy 1.07MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/navicons/166.png0.64KB0.48KB▼ 25.95%
css/images/navicons-small/107.png0.43KB0.42KB▼ 2.49%
css/images/500.png13.57KB4.24KB▼ 68.79%
css/images/navicons-small/27.png0.52KB0.55KB0.00%
css/images/navicons/91.png1.51KB1.34KB▼ 11.15%