84% math-input-with-mathquill

Code Review | Direct math input with MathQuill

WordPress plugin Direct math input with MathQuill scored84%from 54 tests.

About plugin

  • Plugin page: math-input-with-m...
  • Plugin version: 0.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9
  • WordPress version: 6.3.1
  • First release: Feb 12, 2022
  • Latest release: Mar 10, 2022
  • Number of updates: 9
  • Update frequency: every 2.9 days
  • Top authors: eoghanmcilwaine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,159 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.01MB] [CPU: ▼10.88ms] Passed 4 tests

Server-side resources used by Direct math input with MathQuill
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.24 ▼3.79
Dashboard /wp-admin3.31 ▲0.0143.89 ▼8.10
Posts /wp-admin/edit.php3.37 ▲0.0144.24 ▼6.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.21 ▼25.05
Media Library /wp-admin/upload.php3.24 ▲0.0133.38 ▲0.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Direct math input with MathQuill
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲32415.47 ▲1.1831.75 ▲30.0239.25 ▼9.74
Dashboard /wp-admin2,206 ▲185.86 ▲0.8196.01 ▼12.3440.01 ▼2.51
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0539.78 ▼1.7435.89 ▲1.75
Add New Post /wp-admin/post-new.php6,198 ▲4,65620.24 ▲2.11896.92 ▲290.7637.30 ▼15.80
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0096.35 ▼3.5539.94 ▼1.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/math-input-with-mathquill/math-input-with-mathquill.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: mathquill, formula, math, latex, block...

math-input-with-mathquill/math-input-with-mathquill.php 85% from 13 tests

The main PHP file in "Direct math input with MathQuill" ver. 0.2.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.8")

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 plugin29,608 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JSON30029,055
JavaScript1245107276
Markdown1310103
SVG80071
Sass28339
YAML10339
PHP352321
CSS3004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin