78% nt-portfolio

Code Review | NT Portfolio

WordPress plugin NT Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: nt-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Jun 29, 2017
  • Latest release: Jun 29, 2017
  • Number of updates: 3
  • Update frequency: every 34.7 days
  • Top authors: nodetrack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.04ms] Passed 4 tests

Analyzing server-side resources used by NT Portfolio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.99 ▼1.87
Dashboard /wp-admin3.47 ▲0.1647.98 ▼2.86
Posts /wp-admin/edit.php3.58 ▲0.2254.09 ▲3.43
Add New Post /wp-admin/post-new.php6.05 ▲0.1691.27 ▲1.47
Media Library /wp-admin/upload.php3.39 ▲0.1637.13 ▲3.72
Add New /wp-admin/post-new.php?post_type=nt_portfolio3.5155.34
NT Portfolio /wp-admin/edit.php?post_type=nt_portfolio3.4336.50
Help /wp-admin/edit.php?post_type=nt_portfolio&page=nt-portfolio-help3.3630.81

Server storage [IO: ▲1.25MB] [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: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by NT Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.76 ▼0.681.65 ▼0.0740.49 ▼7.70
Dashboard /wp-admin2,239 ▲515.87 ▲1.0098.73 ▼12.8676.88 ▲32.17
Posts /wp-admin/edit.php2,132 ▲432.01 ▼0.0239.67 ▲6.1534.20 ▼3.14
Add New Post /wp-admin/post-new.php1,703 ▲17024.41 ▲1.10708.10 ▲26.4552.34 ▼11.68
Media Library /wp-admin/upload.php1,418 ▲304.14 ▼0.0792.65 ▼19.5971.47 ▲24.02
Add New /wp-admin/post-new.php?post_type=nt_portfolio2,9267.59209.80152.24
NT Portfolio /wp-admin/edit.php?post_type=nt_portfolio1,0881.9731.2831.46
Help /wp-admin/edit.php?post_type=nt_portfolio&page=nt-portfolio-help8922.0124.2428.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nt-portfolio/core/portfolioCustomPost.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nt-portfolio/core/shortcodes.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nt-portfolio/core/helpPage.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nt-portfolio/NT-portfolio.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nt_portfolio
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nt_portfolio
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.

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
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

nt-portfolio/NT-portfolio.php 92% from 13 tests

The entry point to "NT Portfolio" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nt-portfolio.php" instead of "NT-portfolio.php")

Code Analysis Passed 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
No dangerous file extensions were detected2,691 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS256431,320
PHP622337712
JavaScript43832659

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.09MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/comparison.png27.11KB10.46KB▼ 61.43%
images/camera_skins.png23.63KB11.65KB▼ 50.70%
images/singlehelp.png606.22KB210.52KB▼ 65.27%
images/tilehelp.png459.07KB142.00KB▼ 69.07%
images/plugin.png0.99KB1.09KB0.00%