10% modal-popup-portfolio-and-hover-effects

Code Review | modal popup portfolio and hover effects

WordPress plugin modal popup portfolio and hover effects scored 10% from 54 tests.

About plugin

  • Plugin page: modal-popup-portf...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2015
  • Latest release: Apr 5, 2015
  • Number of updates: 18
  • Update frequency: every 1.4 days
  • Top authors: Prince Chowdhury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,464 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/modal-popup-portfolio-and-hover-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: ▼1.23MB] [CPU: ▼72.94ms] Passed 4 tests

This is a short check of server-side resources used by modal popup portfolio and hover effects
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7110.41 ▼55.13
Dashboard /wp-admin2.77 ▼0.5312.76 ▼62.37
Posts /wp-admin/edit.php2.78 ▼0.5813.38 ▼64.39
Add New Post /wp-admin/post-new.php2.77 ▼3.1116.29 ▼109.87
Media Library /wp-admin/upload.php2.77 ▼0.4510.77 ▼45.67
Add New /wp-admin/post-new.php?post_type=portfolios2.7812.52
portfolios /wp-admin/edit.php?post_type=portfolios2.789.67
portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolios_cat&post_type=portfolios2.7812.64

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 240 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for modal popup portfolio and hover effects
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20513.90 ▼0.3012.12 ▲8.9154.62 ▼16.62
Dashboard /wp-admin2,233 ▲574.83 ▼0.11120.26 ▼98.7954.04 ▼17.80
Posts /wp-admin/edit.php2,125 ▲332.02 ▼0.0141.81 ▼53.8543.56 ▼60.62
Add New Post /wp-admin/post-new.php1,912 ▲51422.87 ▲4.86638.58 ▼506.0761.39 ▼78.46
Media Library /wp-admin/upload.php1,418 ▲334.22 ▼0.04146.57 ▼47.0262.63 ▼26.58
Add New /wp-admin/post-new.php?post_type=portfolios1,3671.7315.3929.28
portfolios /wp-admin/edit.php?post_type=portfolios1,1031.9439.4529.44
portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolios_cat&post_type=portfolios1,2952.1530.0632.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/modal-popup-portfolio-and-hover-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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • widget_recent-posts
    • 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 errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=portfolios_cat&post_type=portfolios
    • > Deprecated in wp-content/plugins/modal-popup-portfolio-and-hover-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
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Warning in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php+143
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Warning in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/includes/wpalchemy/MetaBox.php+2657
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Warning in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php+356
    call_user_func() expects parameter 1 to be a valid callback, class 'VP_Control_Field_noteboxpro' not found
    • > GET request to /wp-admin/post-new.php?post_type=portfolios
    • > Error in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php+361
    Uncaught Error: Call to a member function get_default() on null in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php:361
    Stack trace:
    #0 wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php(436): VP_Metabox->_enfactor_field()
    #1 wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php(177): VP_Metabox->_enfactor_group()
    #2 wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/metabox.php(118): VP_Metabox->_enfactor()
    #3 wp-admin/includes/template.php(1443): VP_Metabox->_setup()
    #4 wp-admin/edit-form-advanced.php(688): do_meta_boxes()
    #5 wp-admin/post-new.php(75): require('/var/www/wordpr...')
    #6 {main}
    thrown

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
  • 117× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/views/control/checkbox.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/control/field/select.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Option_Control_Group' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/option/control/group/section.php:3
    • > 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/modal-popup-portfolio-and-hover-effects/framework/config/dependencies.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/classes/control/field/checkbox.php:3
    • > PHP Notice
      Undefined variable: set in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/views/option/set.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/views/control/upload.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/views/control/radiobutton.php: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/modal-popup-portfolio-and-hover-effects/framework/config/dependencies.php on line 72
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/modal-popup-portfolio-and-hover-effects/framework/views/control/html.php on line 1

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)
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Adding item.), #2 (Option panel for this plugin.), #3 (Shortcode button in editor), #4 (shortcode generator)
The official readme.txt is a good inspiration

modal-popup-portfolio-and-hover-effects/super-portfolios.php 92% from 13 tests

"modal popup portfolio and hover effects" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("modal-popup-portfolio-and-hover-effects.php" instead of "super-portfolios.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected19,297 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP932,2602,4329,072
CSS226172836,445
JavaScript525913833,292
SVG300425
Markdown119062
JSON1001

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Method cyclomatic complexity should 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
framework/public/img/bootstrap-colorpicker/saturation.png8.61KB5.13KB▼ 40.41%
framework/public/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%