72% lesser

Code Review | Lesser

WordPress plugin Lesser scored72%from 54 tests.

About plugin

  • Plugin page: lesser
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Jul 25, 2015
  • Number of updates: 14
  • Update frequency: every 0.9 days
  • Top authors: benallfree (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.17MB] [CPU: ▲4.17ms] Passed 4 tests

A check of server-side resources used by Lesser
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2151.21 ▲9.48
Dashboard /wp-admin4.81 ▲1.4659.64 ▼2.39
Posts /wp-admin/edit.php4.92 ▲1.5769.32 ▲7.95
Add New Post /wp-admin/post-new.php7.39 ▲1.50111.47 ▲1.64
Media Library /wp-admin/upload.php4.71 ▲1.4853.52 ▲16.97
Instructions /wp-admin/admin.php?page=lesser_instructions_page6.4360.29
LESS /wp-admin/admin.php?page=lesser_common_page6.6863.53

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

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

Browser metrics Passed 4 tests

Lesser: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.30 ▼1.081.79 ▲0.0442.03 ▼0.23
Dashboard /wp-admin2,235 ▲475.99 ▲1.1298.93 ▼22.9939.23 ▼5.94
Posts /wp-admin/edit.php2,118 ▲292.02 ▲0.0140.05 ▼1.2334.70 ▼1.23
Add New Post /wp-admin/post-new.php1,552 ▲1623.11 ▲0.18658.71 ▲35.9256.76 ▲3.30
Media Library /wp-admin/upload.php1,417 ▲294.30 ▲0.0596.65 ▼5.3542.26 ▼1.41
Instructions /wp-admin/admin.php?page=lesser_instructions_page9542.0526.7627.87
LESS /wp-admin/admin.php?page=lesser_common_page9372.0225.7824.75

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lesser/app/views/instructions.php
  • 427× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > admin_url
    • > after_setup_theme
    • > PHP Fatal error
      Uncaught Error: Class 'LesserAdminPageFramework_FormOutput' not found in wp-content/plugins/lesser/app/apf/factory/AdminPageFramework_Factory/view/AdminPageFramework_FormField/AdminPageFramework_FormField_Base.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LesserAdminPageFramework_FieldType' not found in wp-content/plugins/lesser/app/apf/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_select.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LesserAdminPageFramework_Link_Base' not found in wp-content/plugins/lesser/app/apf/factory/AdminPageFramework/controller/AdminPageFramework_Link_Page.php:8
    • > nonce_user_logged_out
    • > PHP Fatal error
      Uncaught Error: Class 'LesserAdminPageFramework_WPUtility' not found in wp-content/plugins/lesser/app/apf/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_Base.php:8
    • > register_nav_menu_item_post_type_args
    • > PHP Fatal error
      Uncaught Error: Class 'LesserAdminPageFramework_Factory' not found in wp-content/plugins/lesser/app/apf/factory/AdminPageFramework/AdminPageFramework_Router.php:8
    • > post_type_labels_nav_menu_item

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lesser_common_page
    • > Network (severe)
    wp-content/plugins/lesser/app/render.php?mode=common&ver=6.3.1 - 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Add custom CSS to your site, both admin and public pages), #2 (Lesser outputs styling compatible with popular caching plugins), #3 (Lesser Pro - manage public and admin page styling separately), #4 (Lesser Pro - use Development Mode for unpacked CSS and cache-busting)
The official readme.txt is a good inspiration

lesser/plugin.php 92% from 13 tests

The main PHP script in "Lesser" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("lesser.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected17,129 lines of code in 189 files:
LanguageFilesBlank linesComment linesLines of code
PHP1862,9323,35916,864
Markdown1910231
JSON10031
Bourne Shell1003

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.44
Average class complexity16.82
▷ Minimum class complexity1.00
▷ Maximum class complexity391.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes179
▷ Abstract classes4826.82%
▷ Concrete classes13173.18%
▷ Final classes21.53%
Methods1,408
▷ Static methods21014.91%
▷ Public methods85961.01%
▷ Protected methods19613.92%
▷ Private methods35325.07%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 1.28MB with 0.85MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png487.97KB141.40KB▼ 71.02%
screenshot-2.png457.51KB158.92KB▼ 65.26%
screenshot-4.png181.65KB63.95KB▼ 64.79%
screenshot-3.png184.75KB65.52KB▼ 64.54%