84% mystem-extra

Code Review | MyStem Extra

WordPress plugin MyStem Extra scored84%from 54 tests.

About plugin

  • Plugin page: mystem-extra
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5
  • WordPress version: 6.3.1
  • First release: Jun 13, 2018
  • Latest release: Aug 7, 2020
  • Number of updates: 10
  • Update frequency: every 78.7 days
  • Top authors: lobov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.21ms] Passed 4 tests

This is a short check of server-side resources used by MyStem Extra
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.43 ▲4.65
Dashboard /wp-admin3.32 ▲0.0142.57 ▼6.63
Posts /wp-admin/edit.php3.37 ▲0.0145.83 ▲1.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0177.63 ▼21.89
Media Library /wp-admin/upload.php3.24 ▲0.0132.20 ▼1.48

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by MyStem Extra
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.22 ▼1.212.03 ▲0.3846.38 ▲6.56
Dashboard /wp-admin2,211 ▲235.80 ▼0.1099.75 ▼15.8040.90 ▼6.11
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0140.25 ▲1.8936.85 ▲4.69
Add New Post /wp-admin/post-new.php1,519 ▲517.68 ▲0.10654.27 ▼2.7358.30 ▲11.58
Media Library /wp-admin/upload.php1,396 ▲84.28 ▲0.0599.82 ▼10.4941.52 ▼3.18

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
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mystem-extra/shortcodes/shortcodes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/grid-without-sidebar-fourth.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/default-without-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/default.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/grid-third.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/grid-without-sidebar-third.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/classic.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/classic-without-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/single-template/default-without-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-extra/category/template/grid.php:10

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Icons), #2 (Shortcodes)
The official readme.txt might help

mystem-extra/mystem-extra.php Passed 13 tests

The main file in "MyStem Extra" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Add extra features to the WordPress theme MyStem.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,626 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP15207184910
CSS36829492
JavaScript45223224

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.50
▷ Minimum class complexity3.00
▷ Maximum class complexity26.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods13
▷ Static methods17.69%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
shortcodes/assets/js/icon.png1.22KB0.61KB▼ 50.24%
screenshot-2.png31.82KB15.84KB▼ 50.23%
screenshot-1.png29.65KB13.19KB▼ 55.51%
category/assets/img/no-image-icon.png3.48KB1.68KB▼ 51.70%
shortcodes/assets/img/icon.png1.22KB0.61KB▼ 50.24%