78% grit-portfolio

Code Review | GRIT Portfolio

WordPress plugin GRIT Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: grit-portfolio
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2020
  • Latest release: Aug 8, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: rityunjay (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /438 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲2.38ms] Passed 4 tests

Server-side resources used by GRIT Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.48 ▲11.26
Dashboard /wp-admin3.39 ▲0.0953.44 ▲7.82
Posts /wp-admin/edit.php3.49 ▲0.1351.76 ▼3.82
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.57 ▲1.28
Media Library /wp-admin/upload.php3.32 ▲0.0937.46 ▲4.22
Add GRIT Portfolio /wp-admin/post-new.php?post_type=grit-portfolio3.4056.95
All GRIT Portfolio /wp-admin/edit.php?post_type=grit-portfolio3.3440.52
Category /wp-admin/edit-tags.php?taxonomy=portfolio_cat&post_type=grit-portfolio3.3136.38
GRIT Portfolio /wp-admin/options-general.php?page=grit-portfolio3.3338.47

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GRIT Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲23314.28 ▼0.4712.03 ▲10.2246.41 ▲2.39
Dashboard /wp-admin2,236 ▲515.85 ▲0.9998.76 ▼9.9471.38 ▲27.71
Posts /wp-admin/edit.php2,134 ▲452.01 ▼0.0334.42 ▼0.8434.87 ▼4.60
Add New Post /wp-admin/post-new.php1,551 ▲3123.11 ▼0.24753.56 ▲101.6131.06 ▼44.32
Media Library /wp-admin/upload.php1,421 ▲334.19 ▼0.08100.80 ▲3.9284.15 ▲41.00
Add GRIT Portfolio /wp-admin/post-new.php?post_type=grit-portfolio1,7873.5361.5891.43
All GRIT Portfolio /wp-admin/edit.php?post_type=grit-portfolio1,1001.9429.5530.96
Category /wp-admin/edit-tags.php?taxonomy=portfolio_cat&post_type=grit-portfolio1,3042.1424.4631.73
GRIT Portfolio /wp-admin/options-general.php?page=grit-portfolio9522.0722.7233.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/grit-portfolio/public/partials/grit-portfolio-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/grit-portfolio/admin/partials/grit-portfolio-admin-display.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Invalid URI ("paypal.me/rityunjay")
You can look at the official readme.txt

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

The main PHP script in "GRIT Portfolio" version 1.0.0 is automatically included on every request by WordPress
84 characters long description:
This plugin lets you add a portfolio in masonry,grid and slider view using shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin16,755 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS101,7937912,932
JavaScript9421061,755
SVG2131,324
PHP12186582735
HTML1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin