84% rhino-portfolio

Code Review | Rhino Portfolio for WPPB

WordPress plugin Rhino Portfolio for WPPB scored84%from 54 tests.

About plugin

  • Plugin page: rhino-portfolio
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Aug 22, 2021
  • Number of updates: 17
  • Update frequency: every 57.9 days
  • Top authors: fahimmurshed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼11.74ms] Passed 4 tests

This is a short check of server-side resources used by Rhino Portfolio for WPPB
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.69 ▼1.89
Dashboard /wp-admin3.43 ▲0.0944.71 ▼15.41
Posts /wp-admin/edit.php3.48 ▲0.1345.91 ▼7.95
Add New Post /wp-admin/post-new.php6.01 ▲0.1384.19 ▼21.71
Media Library /wp-admin/upload.php3.36 ▲0.1335.61 ▲2.32
All Portfolio /wp-admin/edit.php?post_type=portfolio3.4037.94
Add New Portfolio /wp-admin/post-new.php?post_type=portfolio3.4949.46
Category /wp-admin/edit-tags.php?taxonomy=portfolio-cat&post_type=portfolio3.3532.56
Portfolio Tag /wp-admin/edit-tags.php?taxonomy=portfolio-tag&post_type=portfolio3.3531.91

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Rhino Portfolio for WPPB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22613.67 ▼0.6811.60 ▲9.8347.76 ▲7.51
Dashboard /wp-admin2,238 ▲475.83 ▲0.9595.58 ▼4.9139.29 ▼0.32
Posts /wp-admin/edit.php2,124 ▲322.00 ▲0.0134.64 ▼5.8233.40 ▼1.91
Add New Post /wp-admin/post-new.php1,562 ▲1423.45 ▲5.32667.99 ▲66.0354.14 ▼6.82
Media Library /wp-admin/upload.php1,423 ▲384.28 ▲0.0993.03 ▼16.9341.68 ▼2.91
All Portfolio /wp-admin/edit.php?post_type=portfolio1,1351.9330.3330.63
Add New Portfolio /wp-admin/post-new.php?post_type=portfolio2,5867.74173.2865.66
Category /wp-admin/edit-tags.php?taxonomy=portfolio-cat&post_type=portfolio1,2942.1426.6028.24
Portfolio Tag /wp-admin/edit-tags.php?taxonomy=portfolio-tag&post_type=portfolio1,2692.1325.9327.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/rhino-portfolio/templates/single-portfolio.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rhino-portfolio/post-type/portfolio.php:36

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 97% 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #2 (Rhino Portfolio backend), #3 (Rhino Portfolio backend Add new portfolio)
The official readme.txt might help

rhino-portfolio/rhino-portfolio.php Passed 13 tests

The main PHP script in "Rhino Portfolio for WPPB" version 1.0.8 is automatically included on every request by WordPress
36 characters long description:
Simple Portfolio for WP Page Builder

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,344 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS42036720
PHP46942590
JavaScript483434

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity29.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%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected