73% mighty-portfolio

Code Review | Mighty Portfolio

WordPress plugin Mighty Portfolio scored73%from 54 tests.

About plugin

  • Plugin page: mighty-portfolio
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: Feb 8, 2017
  • Number of updates: 11
  • Update frequency: every 3.4 days
  • Top authors: mightyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /665 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▲2.49ms] Passed 4 tests

Analyzing server-side resources used by Mighty Portfolio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0847.05 ▲4.94
Dashboard /wp-admin3.56 ▲0.2553.40 ▲5.98
Posts /wp-admin/edit.php3.55 ▲0.1962.82 ▲17.93
Add New Post /wp-admin/post-new.php6.01 ▲0.1384.59 ▼6.19
Media Library /wp-admin/upload.php3.37 ▲0.1438.33 ▲5.23
All Portfolios /wp-admin/edit.php?post_type=mp-portfolio3.4341.93
Category /wp-admin/edit-tags.php?taxonomy=cat_portfolio&post_type=mp-portfolio3.3940.13
Add New /wp-admin/post-new.php?post_type=mp-portfolio3.5251.03

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Mighty Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,229 ▲49417.53 ▲3.168.68 ▲6.8839.00 ▼9.09
Dashboard /wp-admin2,530 ▲3427.87 ▲2.97151.63 ▲35.5758.96 ▲9.36
Posts /wp-admin/edit.php2,443 ▲3545.25 ▲3.2069.49 ▲32.3248.78 ▲13.29
Add New Post /wp-admin/post-new.php1,682 ▲14824.73 ▲1.61652.87 ▼18.8049.59 ▼5.09
Media Library /wp-admin/upload.php1,582 ▲1915.46 ▲1.2894.91 ▼8.6757.38 ▲14.50
All Portfolios /wp-admin/edit.php?post_type=mp-portfolio1,4295.2464.1937.57
Category /wp-admin/edit-tags.php?taxonomy=cat_portfolio&post_type=mp-portfolio1,6225.1158.9246.71
Add New /wp-admin/post-new.php?post_type=mp-portfolio3,06711.55239.24145.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 19× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/checkbox_button.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/radio.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/text_align.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/dimension.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/text.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/email.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/textarea.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/password.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/url.php
    • > /wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/number.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/image.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/text_multi.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mighty-portfolio/inc/metabox-config.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/icon.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/google_font.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mighty-portfolio/mighty-portfolio.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/image_multi.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mighty-portfolio/inc/shortcodes.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/editor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/mighty-portfolio/framework/core/fields/fields_views/color_rgba.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=mp-portfolio
    • > Network (severe)
    wp-includes/js/tinymce/plugins/wpembed/plugin.min.js?wp-mce-49110-20201110 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: showcase, project, portfolio, work

mighty-portfolio/mighty-portfolio.php Passed 13 tests

The entry point to "Mighty Portfolio" version 1.0.3 is a PHP file that has certain tags in its header comment area
53 characters long description:
Canto Clients simple and effective clients shortcode.

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
Everything looks great! No dangerous files found in this plugin17,072 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,4691,7756,508
CSS111521585,728
SVG1002,671
PHP403572172,138
Markdown39027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity9.89
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1018.52%
▷ Public methods4990.74%
▷ Protected methods00.00%
▷ Private methods59.26%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
framework/assets/images/transparency-grid.png5.24KB4.19KB▼ 20.16%