10% super-portfolios-and-effects

Code Review | super portfolios and effects

WordPress plugin super portfolios and effects scored10%from 54 tests.

About plugin

  • Plugin page: super-portfolios-...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2015
  • Latest release: Feb 26, 2015
  • Number of updates: 30
  • Update frequency: every 0.3 days
  • Top authors: wordpress prince (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,207 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/super-portfolios-and-effects/framework/includes/wpalchemy/MetaBox.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor

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

Server-side resources used by super portfolios and effects
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.20 ▼2.62
Dashboard /wp-admin3.47 ▲0.1750.57 ▼3.22
Posts /wp-admin/edit.php3.52 ▲0.1656.04 ▲0.97
Add New Post /wp-admin/post-new.php6.86 ▲0.9899.17 ▲1.20
Media Library /wp-admin/upload.php3.33 ▲0.1041.03 ▲5.17
portfolios /wp-admin/edit.php?post_type=portfolios3.3737.89
Add New /wp-admin/post-new.php?post_type=portfolios3.4547.15
portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolios_cat&post_type=portfolios3.3238.46

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 241 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for super portfolios and effects
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22014.03 ▼0.357.36 ▲5.5639.22 ▼6.79
Dashboard /wp-admin2,239 ▲514.88 ▼1.03114.85 ▲12.6144.20 ▲1.84
Posts /wp-admin/edit.php2,119 ▲272.05 ▲0.0140.56 ▼1.4635.61 ▼1.19
Add New Post /wp-admin/post-new.php5,122 ▲3,60323.77 ▲0.66714.21 ▲89.8462.42 ▲13.98
Media Library /wp-admin/upload.php1,415 ▲274.21 ▼0.0299.02 ▼8.1044.95 ▼0.85
portfolios /wp-admin/edit.php?post_type=portfolios1,1001.9331.2131.38
Add New /wp-admin/post-new.php?post_type=portfolios2,5243.8974.9690.16
portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolios_cat&post_type=portfolios1,2922.1426.7029.65

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Warning in wp-content/plugins/super-portfolios-and-effects/framework/includes/wpalchemy/MetaBox.php+2657
    count(): Parameter must be an array or an object that implements Countable

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
The following issues need your attention
  • 118× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/super-portfolios-and-effects/framework/config/dependencies.php on line 168
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/super-portfolios-and-effects/framework/classes/control/field/toggle.php:3
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/super-portfolios-and-effects/framework/views/control/notebox.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/super-portfolios-and-effects/framework/views/control/notebox.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/super-portfolios-and-effects/framework/classes/control/field/checkbox.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/super-portfolios-and-effects/framework/classes/control/field/select.php:3
    • > PHP Notice
      Undefined variable: menu in wp-content/plugins/super-portfolios-and-effects/framework/views/option/menu.php on line 1
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/super-portfolios-and-effects/framework/views/control/upload.php on line 1
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/super-portfolios-and-effects/framework/config/dependencies.php on line 184
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/super-portfolios-and-effects/portfolio-admin/metabox/main.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Javascript (severe) in unknown
    /wp-content/plugins/super-portfolios-and-effects/framework/public/js/vendor/jquery.tipsy.js?ver=1.0.0a 179:24 Uncaught TypeError: this[binder] is not a function
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: vp.init_ace_editor is not a function" "TypeError: vp.init_ace_editor is not a function\n at vp.init_controls (/wp-content/plugins/super-portfolios-and-effects/framework/public/js/shared.min.js?ver=1.1:1:18433)\n at HTMLDivElement.\u003Canonymous> (/wp-content/plugins/super-portfolios-and-effects/framework/public/js/metabox.min.js?ver=6.3.1:1:975)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:1594)\n at e (/wp-content/plugins/super-portfolios-and-effects/framework/public/js/metabox.min.js?ver=6.3.1:1:915)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/super-portfolios-and-effects/framework/public/js/metabox.min.js?ver=6.3.1:1:2532)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: vp.init_ace_editor is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Adding item.), #2 (Option panel for this plugin.), #3 (Shortcode button in editor)
Please take inspiration from this readme.txt

super-portfolios-and-effects/super-portfolios.php 92% from 13 tests

The main PHP file in "super portfolios and effects" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("super-portfolios-and-effects.php" instead of "super-portfolios.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin19,364 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP932,2572,3489,143
CSS226212836,441
JavaScript525913833,292
SVG300425
Markdown119062
JSON1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.38
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes56
▷ Abstract classes47.14%
▷ Concrete classes5292.86%
▷ Final classes00.00%
Methods505
▷ Static methods8917.62%
▷ Public methods47293.47%
▷ Protected methods193.76%
▷ Private methods142.77%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants3792.50%
▷ Class constants37.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
23 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
framework/public/img/vp-sprite.png12.79KB4.90KB▼ 61.71%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
framework/public/img/select2/select2x2.png0.83KB0.77KB▼ 6.15%
framework/public/img/select2/select2.png0.60KB0.99KB0.00%