78% genesis-portfolio-pro

Code Review | Genesis Portfolio Pro

WordPress plugin Genesis Portfolio Pro scored78%from 54 tests.

About plugin

  • Plugin page: genesis-portfolio...
  • Plugin version: 1.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: Aug 15, 2023
  • Number of updates: 25
  • Update frequency: every 105.8 days
  • Top authors: studiopress (40%)nathanrice (28%)Nick_theGeek (24%)osompress (20%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /150,230 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.48ms] Passed 4 tests

Server-side resources used by Genesis Portfolio Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0242.73 ▼3.17
Dashboard /wp-admin3.59 ▲0.0350.95 ▼6.80
Posts /wp-admin/edit.php3.70 ▲0.0258.57 ▲4.75
Add New Post /wp-admin/post-new.php6.17 ▲0.02100.31 ▼6.41
Media Library /wp-admin/upload.php3.51 ▲0.0240.47 ▼5.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Portfolio Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.71 ▲0.341.96 ▲0.2745.78 ▲3.16
Dashboard /wp-admin2,192 ▲185.53 ▼0.0686.70 ▲0.0942.26 ▲3.72
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0251.15 ▲12.3646.23 ▲9.16
Add New Post /wp-admin/post-new.php1,545 ▼023.13 ▼0.14611.86 ▼66.1650.82 ▼7.97
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.0999.50 ▲1.3545.87 ▲3.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/genesis-portfolio-pro/genesis-portfolio-pro.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-portfolio-pro/lib/template-loader.php:46
    • > PHP Warning
      Use of undefined constant GENESIS_PORTFOLIO_LIB - assumed 'GENESIS_PORTFOLIO_LIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/genesis-portfolio-pro/lib/template-loader.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-portfolio-pro/lib/templates/archive-portfolio.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-portfolio-pro/lib/templates/taxonomy-portfolio-type.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/genesis-portfolio-pro/lib/classes/class-genesis-portfolio-widget.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_taxonomy() in wp-content/plugins/genesis-portfolio-pro/lib/post-types-and-taxonomies.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/genesis-portfolio-pro/plugin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-portfolio-pro/lib/templates/single-portfolio.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/genesis-portfolio-pro/lib/views/admin/archive-settings/posts-per-page-meta.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: portfolio, templates, genesis

genesis-portfolio-pro/plugin.php 92% from 13 tests

This is the main PHP file of "Genesis Portfolio Pro" version 1.2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("genesis-portfolio-pro.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected807 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17171407705
CSS219098
Markdown1304

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.21
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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