10% easy-wp-latex-lite

Code Review | Easy WP LaTeX

WordPress plugin Easy WP LaTeX scored10%from 54 tests.

About plugin

  • Plugin page: easy-wp-latex-lite
  • Plugin version: 5.20
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.8
  • WordPress version: 6.3.1
  • First release: Mar 4, 2012
  • Latest release: Aug 1, 2017
  • Number of updates: 72
  • Update frequency: every 27.5 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /18,707 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/easy-wp-latex-lite/EzOptions.php+480
    Methods with the same name as their class will not be constructors in a future version of PHP; EzMiniTab has a deprecated constructor

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.54ms] Passed 4 tests

Analyzing server-side resources used by Easy WP LaTeX
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.48 ▲1.21
Dashboard /wp-admin3.42 ▲0.0752.07 ▼12.35
Posts /wp-admin/edit.php3.47 ▲0.1149.28 ▼3.92
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.44 ▼13.04
Media Library /wp-admin/upload.php3.28 ▲0.0535.62 ▼0.85

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Easy WP LaTeX
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.51 ▲0.361.80 ▲0.0344.14 ▲3.99
Dashboard /wp-admin2,213 ▲254.88 ▼0.03103.56 ▼3.5841.70 ▼2.27
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0135.17 ▼6.0335.07 ▼0.75
Add New Post /wp-admin/post-new.php1,536 ▲623.20 ▲4.94652.36 ▲8.2051.70 ▼10.08
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.02100.88 ▼7.1544.38 ▼4.70
Easy LaTeX Lite /wp-admin/easy-wp-latex-lite.php260.440.1015.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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-wp-latex-lite/ezDenyLite.php on line 22
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-wp-latex-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-wp-latex-lite/EzOptions.php:544
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-wp-latex-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-wp-latex-lite/myPlugins.php:300

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/easy-wp-latex-lite.php
    • > Network (severe)
    wp-admin/easy-wp-latex-lite.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (How to set the options for *Easy WP LaTeX*.), #2 (*Easy WP LaTeX* in action - on my own blog.)
The official readme.txt might help

easy-wp-latex-lite/easy-wp-latex-lite.php 92% from 13 tests

The main PHP script in "Easy WP LaTeX" version 5.20 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 221 characters long)

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 detected3,652 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5268861,896
JavaScript21671651,756

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods98
▷ Static methods44.08%
▷ Public methods98100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ezColor/hs.png2.55KB7.54KB0.00%
img/ezpaypal.png9.22KB3.44KB▼ 62.72%
screenshot-2.png18.83KB8.90KB▼ 52.75%
ezpaypal.png9.22KB3.44KB▼ 62.72%
img/ezsupport.png3.13KB2.01KB▼ 35.75%