10% nimble-portfolio

Code Review | Wordpress Picture / Portfolio / Media Gallery

WordPress plugin Wordpress Picture / Portfolio / Media Gallery scored10%from 54 tests.

About plugin

  • Plugin page: nimble-portfolio
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9
  • WordPress version: 6.3.1
  • First release: Jul 1, 2012
  • Latest release: Dec 9, 2017
  • Number of updates: 128
  • Update frequency: every 15.5 days
  • Top authors: nimble3 (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

3,000+ active /273,746 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioShortcodeWidget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; NimblePortfolioShortcodeWidget has a deprecated constructor

Server metrics [RAM: ▼1.63MB] [CPU: ▼54.08ms] Passed 4 tests

Server-side resources used by Wordpress Picture / Portfolio / Media Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.106.46 ▼38.19
Dashboard /wp-admin2.38 ▼0.937.00 ▼43.28
Posts /wp-admin/edit.php2.38 ▼0.988.02 ▼46.00
Add New Post /wp-admin/post-new.php2.38 ▼3.517.16 ▼88.84
Media Library /wp-admin/upload.php2.38 ▼0.8512.93 ▼24.18
Filters /wp-admin/edit-tags.php?taxonomy=nimble-portfolio-type&post_type=portfolio2.387.81
Redux Framework /wp-admin/tools.php?page=redux-about2.388.11
Portfolio Items /wp-admin/edit.php?post_type=portfolio2.387.44
Generate Shortcode /wp-admin/edit.php?post_type=portfolio&page=generate_shortcode_page_options2.386.90
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio2.388.30
Configuration /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options2.388.76

Server storage [IO: ▲8.01MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 597 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
widget_nimble-portfolio-recent-items-widget
redux_version_upgraded_from
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
generate_shortcode_page-transients
nimble_portfolio_configuration-transients
widget_recent-comments
widget_nimble-portfolio-shortcode-widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Picture / Portfolio / Media Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲31613.83 ▼0.469.70 ▲8.0840.94 ▼1.59
Dashboard /wp-admin2,327 ▲1505.82 ▲0.1589.24 ▲1.4299.15 ▲56.52
Posts /wp-admin/edit.php2,168 ▲692.26 ▲0.2734.17 ▼7.4741.51 ▲4.33
Add New Post /wp-admin/post-new.php1,582 ▲4821.13 ▲2.76675.86 ▲34.3138.20 ▼41.47
Media Library /wp-admin/upload.php1,464 ▲644.48 ▲0.3098.19 ▼7.1480.73 ▲35.39
Filters /wp-admin/edit-tags.php?taxonomy=nimble-portfolio-type&post_type=portfolio1,3741.9930.2345.76
Redux Framework /wp-admin/tools.php?page=redux-about1,1483.7774.6473.00
Portfolio Items /wp-admin/edit.php?post_type=portfolio1,1582.1733.8933.31
Generate Shortcode /wp-admin/edit.php?post_type=portfolio&page=generate_shortcode_page_options1,7343.3583.3370.60
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio2,7637.90173.29153.43
Configuration /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options2,6363.2171.3190.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioShortcodeWidget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; NimblePortfolioShortcodeWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_recent-posts
    • widget_nimble-portfolio-recent-items-widget
    • generate_shortcode_page-transients
    • redux_version_upgraded_from
    • generate_shortcode_page
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_nimble-portfolio-shortcode-widget
    • widget_theysaidso_widget
    • nimble_portfolio_configuration-transients
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioShortcodeWidget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; NimblePortfolioShortcodeWidget has a deprecated constructor
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioRecentItemsWidget.php+13
    Function create_function() is deprecated
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioRecentItemsWidget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; NimblePortfolioRecentItemsWidget has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Warning in wp-content/plugins/nimble-portfolio/admin/redux-framework/inc/class.redux_filesystem.php+29
    Creating default object from empty value
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Deprecated in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioLessC.php+2593
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/nimble-portfolio/nimble-portfolio.php+362
    Undefined index: nimble_portfolio_noncename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/nimble-portfolio/nimble-portfolio.php+292
    Undefined index: global-settings

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 38× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Redux' not found in wp-content/plugins/nimble-portfolio/admin/redux-extensions/extensions-init.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioRecentItemsWidget.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioShortcodeWidget.php:4
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/nimble-portfolio/includes/prettyphoto/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/nimble-portfolio/admin/redux-framework/templates/panel/header_stickybar.tpl.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nimble-portfolio/skins/default/items.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/nimble-portfolio/admin/redux-framework/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Notice
      Undefined variable: ctype in wp-content/plugins/nimble-portfolio/includes/prettyphoto/download-image.php on line 31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nimble-portfolio/includes/class.NimblePortfolioShortcodeWidget.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nimble-portfolio/admin/redux-framework/templates/panel/menu_container.tpl.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Javascript (severe) in unknown
    /wp-content/plugins/nimble-portfolio/includes/admin.js?ver=3.0.1 2:37 Uncaught TypeError: $(...).live is not a function
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio&page=nimble_portfolio_configuration_options
    • > Javascript (severe) in unknown
    /wp-content/plugins/nimble-portfolio/skins/default/admin.js?ver=3.0.1 4:25 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Network (severe)
    wp-content/plugins/nimble-portfolio/skins/default/images/loading.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Rendering (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 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Please add images for these screenshots: #1 (Nimble Portfolio - Shortcode Generator), #2 (Nimble Portfolio - Widgets), #3 (Nimble Portfolio - Options and Separate Gallery meta boxes on Add New Item page), #4 (Nimble Portfolio - Items listing), #5 (Nimble Portfolio - Frontend Display), #6 (Nimble Portfolio - Picture in lightbox), #7 (Nimble Portfolio - Video in lightbox), #8 (Nimble Portfolio - Default Skin options), #9 (Nimble Portfolio - Global Settings), #10 (Nimble Portfolio - prettyPhoto Settings)
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
You can look at the official readme.txt

nimble-portfolio/nimble-portfolio.php 92% from 13 tests

"Wordpress Picture / Portfolio / Media Gallery" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected52,596 lines of code in 418 files:
LanguageFilesBlank linesComment linesLines of code
PHP1305,3756,59424,176
JavaScript1773,5593,19318,103
Sass48589605,373
CSS534121992,877
SVG2001,069
LESS49179804
Markdown2440103
Bourne Shell124055
JSON10036

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity40.64
▷ Minimum class complexity1.00
▷ Maximum class complexity851.00
Average method complexity5.48
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes125
▷ Abstract classes00.00%
▷ Concrete classes125100.00%
▷ Final classes00.00%
Methods1,105
▷ Static methods16915.29%
▷ Public methods64358.19%
▷ Protected methods41137.19%
▷ Private methods514.62%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants57
▷ Global constants00.00%
▷ Class constants57100.00%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
63 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/prettyphoto/img/pp_themes/facebook/contentPatternLeft.png0.13KB0.10KB▼ 24.82%
admin/redux-framework/assets/img/3cm.png2.96KB0.29KB▼ 90.35%
admin/redux-framework/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/prettyphoto/img/pp_themes/light_square/btnPrevious.png1.41KB1.19KB▼ 15.74%
admin/redux-framework/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%