10% mylco

Code Review | myLCO

WordPress plugin myLCO scored10%from 54 tests.

About plugin

  • Plugin page: mylco
  • Plugin version: 0.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: Apr 22, 2010
  • Latest release: Dec 11, 2012
  • Number of updates: 20
  • Update frequency: every 48.3 days
  • Top authors: realloc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,515 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/mylco/include/myLCOoptions.php+137
    Declaration of MyLCOpr::get($url) should be compatible with MyLCOoptions::get()

Server metrics [RAM: ▼1.81MB] [CPU: ▼55.77ms] Passed 4 tests

A check of server-side resources used by myLCO
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.284.64 ▼44.78
Dashboard /wp-admin2.20 ▼1.116.52 ▼43.19
Posts /wp-admin/edit.php2.20 ▼1.167.73 ▼39.48
Add New Post /wp-admin/post-new.php2.20 ▼3.695.60 ▼95.63
Media Library /wp-admin/upload.php2.20 ▼1.036.32 ▼30.62
Add New /wp-admin/link-add.php2.206.14
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category2.206.36
Edit /wp-admin/admin.php?page=myLCO_edit2.206.07
All Links /wp-admin/link-manager.php2.216.81
Dashboard /wp-admin/admin.php?page=mylco/myLCO.php2.205.61
Options /wp-admin/admin.php?page=myLCO_options2.207.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_links
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
_myLCO
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by myLCO
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲13013.60 ▼0.801.64 ▼0.0938.33 ▼6.16
Dashboard /wp-admin2,268 ▲775.84 ▲0.96103.66 ▼4.5341.29 ▼1.56
Posts /wp-admin/edit.php2,151 ▲622.05 ▲0.0339.60 ▲4.0936.25 ▲2.83
Add New Post /wp-admin/post-new.php1,594 ▲5718.47 ▼4.82638.14 ▼64.6055.65 ▲0.83
Media Library /wp-admin/upload.php1,444 ▲564.21 ▼0.0295.35 ▼17.2040.92 ▼4.59
Add New /wp-admin/link-add.php1,6752.2850.9334.04
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category1,3302.1428.9528.55
Edit /wp-admin/admin.php?page=myLCO_edit8462.0728.6829.79
All Links /wp-admin/link-manager.php1,0871.6824.8029.17
Dashboard /wp-admin/admin.php?page=mylco/myLCO.php8462.0724.5224.10
Options /wp-admin/admin.php?page=myLCO_options8871.7226.1624.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/mylco/include/myLCOoptions.php+137
    Declaration of MyLCOpr::get($url) should be compatible with MyLCOoptions::get()
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_links
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=myLCO_options
    • > Warning in wp-content/plugins/mylco/include/myLCOoptions.php+137
    Declaration of MyLCOpr::get($url) should be compatible with MyLCOoptions::get()

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mylco/templates/page.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mylco/templates/row.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mylco/templates/edit.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mylco/templates/main.php:4
    • > PHP Warning
      Declaration of MyLCOpr::get($url) should be compatible with MyLCOoptions::get() in wp-content/plugins/mylco/include/myLCOoptions.php on line 137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mylco/myLCO.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mylco/templates/form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mylco/templates/options.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: check, seo, backlinks, links, mylco

mylco/myLCO.php 85% from 13 tests

"myLCO" version 0.8.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mylco.php" instead of "myLCO.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected2,586 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP103242792,302
PO File2110240272
Markdown17012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity30.27
▷ Minimum class complexity2.00
▷ Maximum class complexity197.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods152
▷ Static methods10.66%
▷ Public methods13689.47%
▷ Protected methods1610.53%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants2281.48%
▷ Class constants518.52%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/stop.png0.68KB0.78KB0.00%
icons/accept.png0.76KB0.81KB0.00%
icons/link_error.png0.68KB0.70KB0.00%
icons/page_error.png0.77KB0.98KB0.00%
icons/error.png0.65KB0.68KB0.00%