62% legull

Code Review | Legull

WordPress plugin Legull scored62%from 54 tests.

About plugin

  • Plugin page: legull
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: Apr 5, 2015
  • Number of updates: 26
  • Update frequency: every 3.7 days
  • Top authors: codearachnid (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active /15,170 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▼48.61ms] Passed 4 tests

Analyzing server-side resources used by Legull
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0510.98 ▼31.59
Dashboard /wp-admin3.53 ▲0.1813.56 ▼48.06
Posts /wp-admin/edit.php3.53 ▲0.1713.04 ▼38.73
Add New Post /wp-admin/post-new.php3.53 ▼2.3514.47 ▼76.06
Media Library /wp-admin/upload.php3.53 ▲0.3014.19 ▼21.01
Publish /wp-admin/admin.php?page=legull_publish3.3614.47
Add-ons /wp-admin/admin.php?page=legull_addons3.3612.59
Getting Started /wp-admin/admin.php?page=legull_dashboard3.3612.72
Terms /wp-admin/admin.php?page=legull_terms3.3615.49

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 186 new files
Database: no new tables, 8 new options
New WordPress options
Legull_activation_status
widget_recent-posts
theysaidso_admin_options
Legull_flush_rewrites
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Legull
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲22913.99 ▼0.636.12 ▲4.3241.88 ▼11.52
Dashboard /wp-admin2,289 ▲865.25 ▼0.63101.42 ▼9.3838.16 ▼5.41
Posts /wp-admin/edit.php2,174 ▲772.37 ▲0.3137.39 ▲0.0731.24 ▲1.87
Add New Post /wp-admin/post-new.php1,572 ▲4623.15 ▲5.64613.96 ▼35.9035.06 ▼44.71
Media Library /wp-admin/upload.php1,471 ▲714.67 ▲0.43106.84 ▼2.3646.50 ▼4.36
Publish /wp-admin/admin.php?page=legull_publish1,1512.6650.6756.13
Add-ons /wp-admin/admin.php?page=legull_addons1,4092.4157.1858.68
Getting Started /wp-admin/admin.php?page=legull_dashboard2,5172.9864.6349.89
Terms /wp-admin/admin.php?page=legull_terms9942.1329.8621.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/utility/AdminPageFramework_Utility/AdminPageFramework_Utility_URL.php+15
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • Legull_flush_rewrites
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=legull_terms
    • > Deprecated in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/utility/AdminPageFramework_Utility/AdminPageFramework_Utility_URL.php+15
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/legull/template/metabox.php
  • 142× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_Script_Base' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/view/AdminPageFramework_Script/AdminPageFramework_Script_CollapsibleSection.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_View' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework/AdminPageFramework_Controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_Page_View' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework/AdminPageFramework_Page_Controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_WPUtility_Hook' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/utility/AdminPageFramework_WPUtility/AdminPageFramework_WPUtility_File.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_FieldType_select' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_size.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_WPUtility' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework/model/AdminPageFramework_FormEmail.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_FieldType_text' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_file.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_FieldType' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_color.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/legull/template/tracking.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Legull_AdminPageFramework_Utility_URL' not found in wp-content/plugins/legull/lib/legull-admin-page-framework/factory/AdminPageFramework_Factory/utility/AdminPageFramework_Utility/AdminPageFramework_Utility_File.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: There are too many tags (19 tag instead of maximum 10)
Please take inspiration from this readme.txt

legull/legull.php Passed 13 tests

The main PHP file in "Legull" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
139 characters long description:
Legull is Terms of Service and Privacy Policy for your WordPress site, generated by simple questions and answers, editable and update-able.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin20,362 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP1671,3604,24220,094
Markdown2950144
JavaScript42464
CSS10059
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity13.17
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes328
▷ Abstract classes13641.46%
▷ Concrete classes19258.54%
▷ Final classes52.60%
Methods1,960
▷ Static methods30015.31%
▷ Public methods1,07654.90%
▷ Protected methods46923.93%
▷ Private methods41521.17%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants311.11%
▷ Class constants2488.89%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/icon-48.png1.32KB1.06KB▼ 19.53%
asset/icon-32.png0.90KB0.79KB▼ 11.87%
asset/icon-16.png0.48KB0.44KB▼ 6.97%
asset/icon-128.png2.96KB2.29KB▼ 22.66%
asset/icon-64.png1.84KB1.39KB▼ 24.28%