78% jds-portfolio

Code Review | JDs Portfolio

WordPress plugin JDs Portfolio scored 78% from 54 tests.

About plugin

  • Plugin page: jds-portfolio
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 5.9.2
  • First release: Sep 23, 2014
  • Latest release: Apr 15, 2019
  • Number of updates: 108
  • Update frequency: every 15.4 days
  • Top authors: JayDeep Nimavat (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

100+ active / 12,997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲3.75MB] [CPU: ▼295.46ms] Passed 4 tests

An overview of server-side resources used by JDs Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.56 ▲4.0487.97 ▲24.59
Dashboard /wp-admin7.57 ▲4.1764.78 ▼18.81
Posts /wp-admin/edit.php7.57 ▲3.9470.92 ▲29.30
Add New Post /wp-admin/post-new.php9.81 ▲2.84129.00 ▼1,212.30
Media Library /wp-admin/upload.php7.57 ▲4.2852.86 ▲24.68
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius7.5755.76

Server storage [IO: ▲6.06MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 285 new files
Database: no new tables, 8 new options
New WordPress options
fs_debug_mode
fs_active_plugins
wp_jds_options
fs_accounts
fs_api_cache
widget_wp_jds_recent_portfolio_widget
fs_gdpr
wp_jds_set_option

Browser metrics Passed 4 tests

A check of browser resources used by JDs Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,959 ▲20516.70 ▲1.1712.65 ▲6.382.76 ▼0.34
Dashboard /wp-admin2,930 ▲696.05 ▼0.12116.83 ▼22.23218.92 ▲57.79
Posts /wp-admin/edit.php2,740 ▲703.24 ▼0.0265.30 ▼25.75148.79 ▲12.44
Add New Post /wp-admin/post-new.php1,833 ▲17221.28 ▼0.22405.31 ▲22.94184.59 ▲22.89
Media Library /wp-admin/upload.php1,744 ▲435.50 ▲0.01160.51 ▲17.08213.99 ▲26.82
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,4632.4956.87134.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • fs_accounts
    • fs_api_cache
    • fs_active_plugins
    • fs_gdpr
    • wp_jds_options
    • wp_jds_set_option
    • fs_debug_mode
    • widget_wp_jds_recent_portfolio_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jds-portfolio/freemius/templates/ajax-loader.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/jds-portfolio/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/jds-portfolio/freemius/templates/account/partials/addon.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (33 tag instead of maximum 10)
The official readme.txt might help

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

The main PHP script in "JDs Portfolio" version 2.1.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 181 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin43,799 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1146,48914,91826,920
PO File105,5506,66712,010
Sass28399772,515
JavaScript9245183919
CSS1610542651
SVG100565
Markdown1610192
JSON10027

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity68.68
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,078
▷ Static methods16615.40%
▷ Public methods76470.87%
▷ Protected methods151.39%
▷ Private methods29927.74%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants121
▷ Global constants10183.47%
▷ Class constants2016.53%
▷ Public constants20100.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
32 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/prettyPhoto/default/default_thumb.png1.50KB0.61KB▼ 59.47%
images/thumbnails/flash-logo.png6.26KB3.92KB▼ 37.35%
images/prettyPhoto/default/sprite_next.png1.33KB0.39KB▼ 70.69%
images/prettyPhoto/dark_rounded/btnNext.png1.38KB1.14KB▼ 17.29%