63% latex2html

Code Review | LaTeX2HTML

WordPress plugin LaTeX2HTML scored63%from 54 tests.

About plugin

  • Plugin page: latex2html
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2013
  • Latest release: Nov 14, 2023
  • Number of updates: 176
  • Update frequency: every 22.4 days
  • Top authors: van-abel (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /8,867 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼4.60ms] Passed 4 tests

Analyzing server-side resources used by LaTeX2HTML
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4044.04 ▲0.38
Dashboard /wp-admin3.73 ▲0.3847.18 ▼13.29
Posts /wp-admin/edit.php3.78 ▲0.4247.80 ▼0.37
Add New Post /wp-admin/post-new.php6.25 ▲0.3685.82 ▼5.11
Media Library /wp-admin/upload.php3.59 ▲0.3635.58 ▲1.13
LaTex2HTML /wp-admin/options-general.php?page=latex2html3.6034.47

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 8 new options
New tables
wp_l2hbibtex
New WordPress options
db_upgraded
l2h_options
l2h_upgrade_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for LaTeX2HTML
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5014.25 ▼0.091.65 ▼0.0938.02 ▼7.91
Dashboard /wp-admin2,202 ▲255.62 ▼0.0688.29 ▼11.9238.87 ▼6.86
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0240.01 ▲2.9035.22 ▲0.46
Add New Post /wp-admin/post-new.php1,531 ▲523.31 ▲0.16596.55 ▼71.1545.51 ▼5.44
Media Library /wp-admin/upload.php1,407 ▲74.32 ▲0.1298.54 ▲0.4343.67 ▲2.02
LaTex2HTML /wp-admin/options-general.php?page=latex2html8712.1625.4032.28

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

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

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/latex2html/inc/html/manual.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: date in wp-content/plugins/latex2html/inc/html/manual.php on line 4
    • > PHP Notice
      Undefined index: ver in wp-content/plugins/latex2html/inc/html/manual.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=latex2html
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'top')" "TypeError: Cannot read properties of undefined (reading 'top')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/latex2html/inc/js/l2h.js:76:104)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=latex2html
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'top')

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: html, latex, mathjax

latex2html/latex2html.php Passed 13 tests

The main file in "LaTeX2HTML" v. 2.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Translate your Latex document into HTML+MathJax.

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
Everything looks great! No dangerous files found in this plugin2,845 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP91312512,303
CSS6747459
JavaScript13783

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.55
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods95
▷ Static methods2627.37%
▷ Public methods95100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
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
3 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/pic/alipay.png35.53KB13.53KB▼ 61.91%
inc/pic/paypal.png37.59KB13.59KB▼ 63.85%
inc/pic/tenpay.png34.67KB9.58KB▼ 72.36%