10% lessphp

Code Review | Less PHP Compiler

WordPress plugin Less PHP Compiler scored 10% from 54 tests.

About plugin

  • Plugin page: lessphp
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.1
  • WordPress version: 5.8.1
  • First release: Jan 30, 2014
  • Latest release: Apr 23, 2016
  • Number of updates: 15
  • Update frequency: every 54.3 days
  • Top authors: aristath (86.67%)Unyson (20%)

Code review

54 tests

User reviews

4 reviews

Install metrics

8,000+ active / 46,646 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/lessphp/less-php/less.php+5410
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▲0.44MB] [CPU: ▼180.98ms] Passed 4 tests

Analyzing server-side resources used by Less PHP Compiler
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲1.3510.59 ▼11.14
Dashboard /wp-admin4.09 ▲1.0314.58 ▼18.18
Posts /wp-admin/edit.php4.09 ▲0.989.87 ▼35.98
Add New Post /wp-admin/post-new.php4.09 ▼1.3411.07 ▼642.76
Media Library /wp-admin/upload.php4.09 ▲1.0813.48 ▼26.99

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Less PHP Compiler: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.18 ▲0.659.18 ▼0.0654.25 ▲7.09
Dashboard /wp-admin2,970 ▲395.88 ▼0.10160.38 ▲18.48120.54 ▲5.53
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0271.65 ▲3.4791.01 ▲2.81
Add New Post /wp-admin/post-new.php1,500 ▼37218.66 ▼0.47362.39 ▼6.93109.94 ▲1.65
Media Library /wp-admin/upload.php1,810 ▼05.06 ▲0.02150.53 ▲0.37118.67 ▼0.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/lessphp/less-php/less.php+5410
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 30× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9794
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9794
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9768
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9745
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9801
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9716
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9735
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/includes/Less.php on line 8539
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/less-php/less.php on line 9745
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/lessphp/includes/Less.php on line 8560

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: less, preprocessor, compiler

lessphp/less-plugin.php 92% from 13 tests

"Less PHP Compiler" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lessphp.php" instead of "less-plugin.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin15,915 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65,0224,02215,915

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity29.87
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes121
▷ Abstract classes21.65%
▷ Concrete classes11998.35%
▷ Final classes00.00%
Methods1,262
▷ Static methods776.10%
▷ Public methods86468.46%
▷ Protected methods21517.04%
▷ Private methods18314.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin