84% mfolio-lite

Code Review | mFolio Lite

WordPress plugin mFolio Lite scored84%from 54 tests.

About plugin

  • Plugin page: mfolio-lite
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Oct 1, 2022
  • Number of updates: 6
  • Update frequency: every 138.3 days
  • Top authors: themelooks (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) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.58ms] Passed 4 tests

This is a short check of server-side resources used by mFolio Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.81 ▼0.85
Dashboard /wp-admin3.42 ▲0.0744.05 ▼12.41
Posts /wp-admin/edit.php3.53 ▲0.1846.54 ▲0.85
Add New Post /wp-admin/post-new.php6.14 ▲0.2579.90 ▼12.43
Media Library /wp-admin/upload.php3.34 ▲0.1132.91 ▼0.64
All Portfolios /wp-admin/edit.php?post_type=mfolio_portfolio3.3935.70
Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=mfolio_portfolio3.3333.56
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=mfolio_portfolio3.3433.17
Add New /wp-admin/post-new.php?post_type=mfolio_portfolio6.1378.79

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

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

Browser metrics Passed 4 tests

mFolio Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.18 ▼0.221.70 ▲0.0741.95 ▼3.20
Dashboard /wp-admin2,243 ▲635.55 ▼0.0882.31 ▼5.0572.69 ▲34.69
Posts /wp-admin/edit.php2,151 ▲512.00 ▼0.0136.26 ▼0.4535.67 ▼1.99
Add New Post /wp-admin/post-new.php1,585 ▲5723.06 ▼0.02688.62 ▲24.9658.97 ▼1.13
Media Library /wp-admin/upload.php1,454 ▲514.17 ▼0.0493.38 ▼5.8376.38 ▲29.47
All Portfolios /wp-admin/edit.php?post_type=mfolio_portfolio1,1401.9833.6830.14
Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=mfolio_portfolio1,3002.2928.8632.71
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=mfolio_portfolio1,3212.2527.1731.97
Add New /wp-admin/post-new.php?post_type=mfolio_portfolio6,29225.01845.25126.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-gallery.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-related.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-simple-slider.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-hover.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/double-image.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-filter.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-slider.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-meta.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-details-banner.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mfolio-lite/addons/widgets/portfolio-grid.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Version format is invalid
Please take inspiration from this readme.txt

mfolio-lite/mfolio.php 92% from 13 tests

"mFolio Lite" version 1.2.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 ("mfolio-lite.php" instead of "mfolio.php")

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
There were no executable files found in this plugin5,345 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP164662593,554
CSS2292191,630
JavaScript54926140
SVG30021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.17
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods88
▷ Static methods11.14%
▷ Public methods6675.00%
▷ Protected methods2225.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
assets/img/favicon.png1.43KB0.96KB▼ 32.90%