84% theme-junkie-portfolio-content

Code Review | Junkie Portfolio

WordPress plugin Junkie Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: theme-junkie-port...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 17
  • Update frequency: every 182.9 days
  • Top authors: themejunkie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,980 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.01ms] Passed 4 tests

This is a short check of server-side resources used by Junkie Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.32 ▼0.77
Dashboard /wp-admin3.35 ▲0.0546.46 ▲1.74
Posts /wp-admin/edit.php3.40 ▲0.0440.89 ▼4.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.52 ▲3.77
Media Library /wp-admin/upload.php3.27 ▲0.0441.91 ▲3.62
Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio3.3640.31
Add New /wp-admin/post-new.php?post_type=portfolio3.4448.27
Projects /wp-admin/edit.php?post_type=portfolio3.3440.34

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Junkie Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9914.68 ▲0.091.78 ▲0.0436.94 ▼2.08
Dashboard /wp-admin2,234 ▲456.02 ▲0.0998.80 ▼3.8439.57 ▼6.08
Posts /wp-admin/edit.php2,120 ▲311.98 ▼0.0536.46 ▼0.5632.22 ▼3.30
Add New Post /wp-admin/post-new.php1,540 ▲717.68 ▼5.46631.09 ▼27.3439.72 ▼11.21
Media Library /wp-admin/upload.php1,419 ▲314.20 ▲0.00101.53 ▲5.9543.67 ▲2.66
Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio1,2902.1426.3527.34
Add New /wp-admin/post-new.php?post_type=portfolio2,7647.96190.0167.24
Projects /wp-admin/edit.php?post_type=portfolio1,3353.3046.9532.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-portfolio-content/inc/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-portfolio-content/admin/admin.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-portfolio-content/inc/taxonomy.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-junkie-portfolio-content/inc/messages.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-portfolio-content/admin/metabox.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-portfolio-content/inc/post-type.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Portfolio screen), #2 (Meta boxes)
You can take inspiration from this readme.txt

theme-junkie-portfolio-content/tj-portfolio-content.php 92% from 13 tests

The principal PHP file in "Junkie Portfolio" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("theme-junkie-portfolio-content.php" instead of "tj-portfolio-content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin433 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7120259302
JavaScript1301774
CSS19057

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png10.04KB10.09KB0.00%
screenshot-1.png21.27KB20.64KB▼ 2.94%