73% nx-portfolio-slider

Code Review | NX Portfolio Slider

WordPress plugin NX Portfolio Slider scored73%from 54 tests.

About plugin

  • Plugin page: nx-portfolio-slider
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Mar 10, 2022
  • Latest release: Mar 10, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: newexsoft26 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /795 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼16.12ms] Passed 4 tests

Server-side resources used by NX Portfolio Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.33 ▲1.86
Dashboard /wp-admin3.34 ▲0.0444.60 ▼3.25
Posts /wp-admin/edit.php3.39 ▲0.0349.56 ▲4.70
Add New Post /wp-admin/post-new.php3.12 ▼2.7633.29 ▼67.78
Media Library /wp-admin/upload.php3.26 ▲0.0343.00 ▲11.25
Slider Settings /wp-admin/edit.php?post_type=nx_portfolio_slider&page=nx_slider_settings3.2831.25
All Slider /wp-admin/edit.php?post_type=nx_portfolio_slider3.3136.40
Add New /wp-admin/post-new.php?post_type=nx_portfolio_slider3.1233.95
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=nx_portfolio_slider3.2649.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 12 new options
New WordPress options
nx_slider_navbar
nx_slider_loop
category_children
widget_recent-comments
nx_slider_autoplay
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

NX Portfolio Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20414.23 ▼0.068.15 ▲6.5140.91 ▲0.66
Dashboard /wp-admin2,241 ▲495.84 ▲0.88100.56 ▼10.5480.17 ▲36.17
Posts /wp-admin/edit.php2,130 ▲412.02 ▲0.0335.15 ▼1.8534.33 ▲2.02
Add New Post /wp-admin/post-new.php1,701 ▲17821.80 ▼1.44756.47 ▲73.7852.32 ▲0.76
Media Library /wp-admin/upload.php1,426 ▲384.16 ▼0.02107.13 ▲4.2384.31 ▲39.86
Slider Settings /wp-admin/edit.php?post_type=nx_portfolio_slider&page=nx_slider_settings9532.0725.9229.28
All Slider /wp-admin/edit.php?post_type=nx_portfolio_slider1,1411.9536.4231.51
Add New /wp-admin/post-new.php?post_type=nx_portfolio_slider2,3357.61169.50130.42
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=nx_portfolio_slider1,4842.1531.6848.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • nx_portfolio_slider_installation_time
    • nx_slider_navbar
    • nx_slider_autoplay
    • widget_theysaidso_widget
    • category_children
    • widget_recent-posts
    • nx_slider_autoplay_timeout
    • nx_slider_loop
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=nx_portfolio_slider
    • > Notice in wp-content/plugins/nx-portfolio-slider/cpt/nx-portfolio-slider.php+72
    Undefined index: portfolio_meta_box_cb_nonce

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nx-portfolio-slider/public/partials/nx-portfolio-slider-public-display.php
    • > /wp-content/plugins/nx-portfolio-slider/admin/partials/nx-portfolio-slider-admin-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nx-portfolio-slider/cpt/nx-portfolio-slider.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_setting() in wp-content/plugins/nx-portfolio-slider/includes/nx-portflio-slider-options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nx-portfolio-slider/shortcode/portfolio-slider.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/nx-portfolio-slider/admin/partials/slider-settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: portfolio sliders, project slider, carousel slider, slider

nx-portfolio-slider/nx-portfolio-slider.php Passed 13 tests

This is the main PHP file of "NX Portfolio Slider" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Make portfolio, project slider without any coding knowladge

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin622 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP16165545409
CSS52327196
JavaScript44659
SVG2008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/hoverleft.png1.06KB0.64KB▼ 39.80%
public/img/hoverarrow.png0.93KB0.57KB▼ 38.63%