72% hulvire-fotofolio

Code Review | Hulvire Fotofolio

WordPress plugin Hulvire Fotofolio scored72%from 54 tests.

About plugin

  • Plugin page: hulvire-fotofolio
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2015
  • Latest release: Aug 22, 2016
  • Number of updates: 20
  • Update frequency: every 25.9 days
  • Top authors: hulvire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /745 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
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.57ms] Passed 4 tests

An overview of server-side resources used by Hulvire Fotofolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.97 ▼3.87
Dashboard /wp-admin3.42 ▲0.1254.41 ▲4.56
Posts /wp-admin/edit.php3.53 ▲0.1852.06 ▲1.54
Add New Post /wp-admin/post-new.php6.00 ▲0.1285.43 ▼12.52
Media Library /wp-admin/upload.php3.34 ▲0.1142.55 ▲4.77
Pridaj nový /wp-admin/post-new.php?post_type=hulvire_fotofolio3.4048.21
Hulvire Fotofolio /wp-admin/options-general.php?page=wp_hulvire_fotofolio3.3039.81
Všetky fotofolio /wp-admin/edit.php?post_type=hulvire_fotofolio3.3938.30

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hulvire Fotofolio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.64 ▼0.716.63 ▲4.6439.91 ▼3.13
Dashboard /wp-admin2,224 ▲335.88 ▲0.9798.64 ▼10.7574.10 ▲34.19
Posts /wp-admin/edit.php2,125 ▲392.00 ▲0.0439.49 ▲3.4634.30 ▼1.33
Add New Post /wp-admin/post-new.php1,703 ▲17524.50 ▲6.11682.68 ▲80.7851.99 ▲0.38
Media Library /wp-admin/upload.php1,418 ▲334.21 ▼0.1697.70 ▼4.6071.40 ▲23.17
Pridaj nový /wp-admin/post-new.php?post_type=hulvire_fotofolio1,6913.5062.6486.92
Hulvire Fotofolio /wp-admin/options-general.php?page=wp_hulvire_fotofolio7171.148.9423.79
Všetky fotofolio /wp-admin/edit.php?post_type=hulvire_fotofolio1,1161.9533.7330.37

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_hulvire_fotofolio
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/hulvire-fotofolio/templates/settings.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/hulvire-fotofolio/templates/settings.php(5): do_settings_fields()
    #1 wp-content/plugins/hulvire-fotofolio/hulvire-fotofolio-settings.php(190): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): WP_Hulvire_Fotofolio_Settings->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/hulvire-fotofolio/hulvire-fotofolio.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/hulvire-fotofolio/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hulvire-fotofolio/post-types/hulvire-fotofolio-text-type.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This is settings of plugin), #2 (This is plugin in wordpress page)
You can take inspiration from this readme.txt

hulvire-fotofolio/hulvire-fotofolio.php 85% from 13 tests

The principal PHP file in "Hulvire Fotofolio" v. 1.5.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin748 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP413488425
JavaScript37126179
CSS22815144

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/fotofolio-icon-a.png0.97KB0.15KB▼ 84.74%