78% muc-luc

Code Review | Muc luc

WordPress plugin Muc luc scored78%from 54 tests.

About plugin

  • Plugin page: muc-luc
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.8+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Aug 22, 2021
  • Number of updates: 14
  • Update frequency: every 18.4 days
  • Top authors: nhomcaodem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Muc luc
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.99 ▲1.49
Dashboard /wp-admin3.33 ▼0.0148.93 ▼13.87
Posts /wp-admin/edit.php3.38 ▲0.0349.65 ▼2.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.22 ▼1.64
Media Library /wp-admin/upload.php3.26 ▲0.0340.26 ▲2.35
Muc luc /wp-admin/options-general.php?page=mucluc-options3.2028.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Muc luc
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲10413.24 ▼1.163.29 ▲1.6239.96 ▼0.32
Dashboard /wp-admin2,222 ▲195.79 ▲0.89100.38 ▼2.2738.77 ▼8.14
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0240.04 ▲3.8634.77 ▲0.71
Add New Post /wp-admin/post-new.php1,529 ▼217.55 ▼5.51610.81 ▼59.1856.04 ▲3.65
Media Library /wp-admin/upload.php1,401 ▲14.24 ▼0.0399.29 ▼17.8246.15 ▼1.90
Muc luc /wp-admin/options-general.php?page=mucluc-options8572.0223.5736.60

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mucluc-options
    • > Notice in wp-content/plugins/muc-luc/inc/mucluc-admin-page.php+29
    Trying to access array offset on value of type bool

SRP 50% 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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/muc-luc/inc/mucluc-admin-page.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/muc-luc/mucluc-tocbot.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/muc-luc/inc/mucluc-content.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in muc-luc/assets to your readme.txt
Please take inspiration from this readme.txt

muc-luc/mucluc-tocbot.php 92% from 13 tests

The main PHP file in "Muc luc" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("muc-luc.php" instead of "mucluc-tocbot.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin411 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS182195
PHP302397
PO File2224561
JavaScript22556
SVG2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/img/mucluc_list.png1.50KB0.55KB▼ 63.04%