84% mathml-block

Code Review | MathML Block

WordPress plugin MathML Block scored84%from 54 tests.

About plugin

  • Plugin page: mathml-block
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Oct 12, 2022
  • Number of updates: 17
  • Update frequency: every 81.5 days
  • Top authors: adamsilverstein (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /16,415 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by MathML Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.10 ▼3.67
Dashboard /wp-admin3.34 ▼0.0147.27 ▼17.74
Posts /wp-admin/edit.php3.39 ▲0.0347.71 ▼2.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.25 ▼8.95
Media Library /wp-admin/upload.php3.26 ▲0.0342.85 ▲5.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 1,384 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

MathML Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▼0.031.74 ▼0.0339.99 ▲0.61
Dashboard /wp-admin2,195 ▲145.66 ▼0.0886.46 ▼52.3444.30 ▼14.05
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0241.99 ▲5.7043.20 ▲10.05
Add New Post /wp-admin/post-new.php6,220 ▲4,68719.99 ▼3.50945.67 ▲268.6438.75 ▼23.14
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.05113.53 ▲8.2047.58 ▲2.71

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MathMLBlock\\add_action() in wp-content/plugins/mathml-block/mathml-block.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: mathml, gutenberg, block editor, math, block

mathml-block/mathml-block.php Passed 13 tests

The principal PHP file in "MathML Block" v. 1.2.2 is loaded by WordPress automatically on each request
24 characters long description:
Display MathML formulas.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected160,902 lines of code in 1,369 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1,3617,82534,183143,023
JSON40017,723
PHP12463124
YAML10017
Markdown19012
CSS1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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
Namespaces1
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%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
5 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png15.19KB7.43KB▼ 51.10%
assets/screenshot-1.png60.41KB17.46KB▼ 71.09%
assets/icon-128x128.png5.01KB2.48KB▼ 50.54%
assets/banner-1544x500.png103.58KB33.38KB▼ 67.77%
assets/banner-772x250.png39.06KB12.72KB▼ 67.44%