78% refolio

Code Review | reFolio - Elegant Portfolios

WordPress plugin reFolio - Elegant Portfolios scored78%from 54 tests.

About plugin

  • Plugin page: refolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Mar 24, 2013
  • Latest release: Mar 30, 2013
  • Number of updates: 8
  • Update frequency: every 5.4 days
  • Top authors: kylethielk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,844 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by reFolio - Elegant Portfolios
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.60 ▼1.47
Dashboard /wp-admin3.32 ▼0.0349.27 ▼15.27
Posts /wp-admin/edit.php3.37 ▲0.0153.01 ▲0.38
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.92 ▼1.18
Media Library /wp-admin/upload.php3.24 ▲0.0135.92 ▼3.64
Help Me! /wp-admin/admin.php?page=refolio_help3.2136.60
reFolio /wp-admin/admin.php?page=refolio_review3.1937.32
New Portfolio /wp-admin/admin.php?page=refolio_modify3.2234.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for reFolio - Elegant Portfolios
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲19513.57 ▼0.878.50 ▲6.7437.31 ▼17.62
Dashboard /wp-admin2,251 ▲485.81 ▼0.05100.05 ▼13.0335.71 ▼8.22
Posts /wp-admin/edit.php2,151 ▲542.32 ▲0.3138.03 ▲0.8736.35 ▲4.33
Add New Post /wp-admin/post-new.php1,558 ▲2723.49 ▲0.12668.80 ▲15.1972.18 ▼5.67
Media Library /wp-admin/upload.php1,446 ▲464.32 ▲0.08111.00 ▲1.9749.54 ▼3.37
Help Me! /wp-admin/admin.php?page=refolio_help9322.0329.0127.64
reFolio /wp-admin/admin.php?page=refolio_review8731.9628.9330.88
New Portfolio /wp-admin/admin.php?page=refolio_modify1,1212.1739.9333.53

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 did not uninstall successfully, leaving 7 options in the database
    • refolio_portfolios
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=refolio_review
    • > Warning in wp-content/plugins/refolio/refolio-pages.php+58
    count(): Parameter must be an array or an object that implements Countable

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/refolio/refolio-pages.php' (include_path='.:/usr/share/php') in wp-content/plugins/refolio/refolio.php on line 12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/refolio/refolio-portfolios.php on line 2
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/refolio/refolio-pages.php): failed to open stream: No such file or directory in wp-content/plugins/refolio/refolio.php on line 12
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/refolio/refolio-portfolio.php' (include_path='.:/usr/share/php') in wp-content/plugins/refolio/refolio-portfolios.php on line 2
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/refolio/refolio-portfolio.php): failed to open stream: No such file or directory in wp-content/plugins/refolio/refolio-portfolios.php on line 2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/refolio/refolio.php on line 12

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === refolio === )
Please take inspiration from this readme.txt

refolio/refolio.php Passed 13 tests

The primary PHP file in "reFolio - Elegant Portfolios" version 1.0 is used by WordPress to initiate all plugin functionality
41 characters long description:
A beautiful and elegant portfolio plugin.

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 plugin1,004 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5162195639
JavaScript356132319
CSS211046

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin