84% cool-portfolio

Code Review | Cool Portfolio

WordPress plugin Cool Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: cool-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2016
  • Latest release: Aug 26, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.88ms] Passed 4 tests

A check of server-side resources used by Cool Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.74 ▲2.03
Dashboard /wp-admin3.33 ▲0.0342.80 ▼4.10
Posts /wp-admin/edit.php3.39 ▲0.0344.32 ▼6.18
Add New Post /wp-admin/post-new.php5.92 ▲0.03104.99 ▲19.68
Media Library /wp-admin/upload.php3.26 ▲0.0333.53 ▼3.27
All Portfolios /wp-admin/edit.php?post_type=coolportfolio3.3033.14
Genre /wp-admin/edit-tags.php?taxonomy=genre&post_type=coolportfolio3.3434.72
Add New /wp-admin/post-new.php?post_type=coolportfolio3.3846.62

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Cool Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.24 ▼1.061.98 ▲0.4542.75 ▲2.91
Dashboard /wp-admin2,237 ▲464.88 ▼0.21107.19 ▲4.4841.20 ▼2.34
Posts /wp-admin/edit.php2,123 ▲372.06 ▲0.0441.21 ▲3.7837.43 ▼1.26
Add New Post /wp-admin/post-new.php1,559 ▲3723.34 ▲0.12635.75 ▼50.8964.62 ▲2.32
Media Library /wp-admin/upload.php1,419 ▲344.32 ▲0.1094.46 ▼6.6442.55 ▼0.53
All Portfolios /wp-admin/edit.php?post_type=coolportfolio1,1091.9529.9827.94
Genre /wp-admin/edit-tags.php?taxonomy=genre&post_type=coolportfolio1,2962.1427.6432.25
Add New /wp-admin/post-new.php?post_type=coolportfolio2,3807.58170.3961.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cool-portfolio/main.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: portfolio, lightbox, image, popup box, cool portfolio...

cool-portfolio/main.php 92% from 13 tests

The entry point to "Cool 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 ("cool-portfolio.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin290 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS160167
PHP1182892
JavaScript13031

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin