84% basic-portfolio

Code Review | Basic Portfolio

WordPress plugin Basic Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: basic-portfolio
  • Plugin version: 0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2023
  • Latest release: Oct 4, 2023
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: angel_aparicio_gomez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /22 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.06MB] [CPU: ▼5.50ms] Passed 4 tests

A check of server-side resources used by Basic Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.45 ▼7.52
Dashboard /wp-admin3.36 ▲0.0647.78 ▼7.42
Posts /wp-admin/edit.php3.41 ▲0.0649.46 ▼2.06
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.81 ▼5.00
Media Library /wp-admin/upload.php3.29 ▲0.0633.47 ▼0.83
Categorías /wp-admin/edit-tags.php?taxonomy=categories-work-portfolio&post_type=work-portfolio3.2835.24
Trabajos /wp-admin/edit.php?post_type=work-portfolio3.3335.48
Nuevo trabajo /wp-admin/post-new.php?post_type=work-portfolio3.4247.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Basic Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.36 ▲0.011.63 ▼0.3340.78 ▼6.60
Dashboard /wp-admin2,226 ▲525.62 ▲0.0997.45 ▲9.6144.11 ▲0.86
Posts /wp-admin/edit.php2,131 ▲282.03 ▲0.0539.92 ▲0.2137.97 ▲1.45
Add New Post /wp-admin/post-new.php1,457 ▼8022.54 ▲4.42551.05 ▼111.5331.12 ▼30.55
Media Library /wp-admin/upload.php1,431 ▲284.17 ▲0.0198.26 ▼9.4646.76 ▲3.29
Categorías /wp-admin/edit-tags.php?taxonomy=categories-work-portfolio&post_type=work-portfolio1,2772.1326.1430.63
Trabajos /wp-admin/edit.php?post_type=work-portfolio1,1011.9531.2731.59
Nuevo trabajo /wp-admin/post-new.php?post_type=work-portfolio2,3157.68175.4967.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/basic-portfolio/metaboxes.php
    • > /wp-content/plugins/basic-portfolio/post_type.php
    • > /wp-content/plugins/basic-portfolio/shortcode.php
    • > /wp-content/plugins/basic-portfolio/basic-portfolio.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: share, social

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

The main PHP script in "Basic Portfolio" version 0.1 is automatically included on every request by WordPress
46 characters long description:
Very simple plugin to create a works portfolio

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
Success! There were no dangerous files found in this plugin130 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4509122
CSS1108

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin