84% insert-math

Code Review | Insert math

WordPress plugin Insert math scored84%from 54 tests.

About plugin

  • Plugin page: insert-math
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 3, 2017
  • Latest release: Aug 3, 2017
  • Number of updates: 18
  • Update frequency: N/A
  • Top authors: CMTV (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Insert math
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.02 ▲5.61
Dashboard /wp-admin3.32 ▲0.0245.99 ▼1.10
Posts /wp-admin/edit.php3.37 ▲0.0247.43 ▼0.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.14 ▼2.76
Media Library /wp-admin/upload.php3.24 ▲0.0135.25 ▼1.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Insert math
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,389 ▲65418.24 ▲3.8836.13 ▲33.9950.36 ▲7.03
Dashboard /wp-admin2,453 ▲2657.04 ▲1.16168.21 ▲66.36100.86 ▲57.78
Posts /wp-admin/edit.php2,350 ▲2614.25 ▲2.2396.71 ▲57.3594.84 ▲57.54
Add New Post /wp-admin/post-new.php6,548 ▲5,02628.13 ▲4.841,005.87 ▲337.2295.99 ▲41.67
Media Library /wp-admin/upload.php1,638 ▲2475.96 ▲1.77160.54 ▲59.52110.60 ▲67.24

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/insert-math/insert-math.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: math, tex, latex, formula, insert formula...

insert-math/insert-math.php Passed 13 tests

The main PHP script in "Insert math" version 2.0 is automatically included on every request by WordPress
54 characters long description:
Fast and handy insert any math formulas in your posts.

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
Good job! No executable or dangerous file extensions detected1,333 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS441481,225
PHP13330103
JavaScript3003
SVG2002

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.04
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 1.35MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-ui-css/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
assets/screenshot-2.png331.32KB185.82KB▼ 43.92%
assets/screenshot-1.png406.54KB214.14KB▼ 47.33%
jquery-ui-css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
jquery-ui-css/images/ui-icons_777620_256x240.png4.52KB4.18KB▼ 7.58%