78% unguessable-images

Code Review | Unguessable Images

WordPress plugin Unguessable Images scored78%from 54 tests.

About plugin

  • Plugin page: unguessable-images
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 3, 2019
  • Latest release: Jan 3, 2019
  • Number of updates: 3
  • Update frequency: every 54.4 days
  • Top authors: phpdevca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 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
Installer ran successfully

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

Server-side resources used by Unguessable Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.67 ▲0.81
Dashboard /wp-admin3.33 ▲0.0247.92 ▼1.86
Posts /wp-admin/edit.php3.44 ▲0.0951.24 ▼0.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.43 ▲5.05
Media Library /wp-admin/upload.php3.25 ▲0.0233.94 ▼4.66
Unguessable Images /wp-admin/options-general.php?page=unguessable_settings3.1928.31

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
unguessable_images_settings
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Unguessable Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.401.96 ▲0.0438.89 ▼4.67
Dashboard /wp-admin2,196 ▲165.57 ▼0.0788.38 ▼0.7239.57 ▲4.21
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0241.11 ▲2.3536.42 ▲0.03
Add New Post /wp-admin/post-new.php1,534 ▼623.28 ▲0.41674.20 ▲49.5463.51 ▼1.84
Media Library /wp-admin/upload.php1,407 ▲104.25 ▲0.05113.59 ▲10.6349.27 ▲1.19
Unguessable Images /wp-admin/options-general.php?page=unguessable_settings8512.0123.1224.53

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

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=unguessable_settings
    • > Notice in wp-content/plugins/unguessable-images/options_class.php+163
    Undefined index: use_original_filename
    • > GET request to /wp-admin/options-general.php?page=unguessable_settings
    • > Notice in wp-content/plugins/unguessable-images/options_class.php+177
    Undefined index: max_num_chars_from_original_filename
    • > GET request to /wp-admin/options-general.php?page=unguessable_settings
    • > Notice in wp-content/plugins/unguessable-images/options_class.php+177
    Undefined index: prefix
    • > GET request to /wp-admin/options-general.php?page=unguessable_settings
    • > Notice in wp-content/plugins/unguessable-images/options_class.php+177
    Undefined index: suffix
    • > GET request to /wp-admin/options-general.php?page=unguessable_settings
    • > Notice in wp-content/plugins/unguessable-images/options_class.php+177
    Undefined index: connector_string

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/unguessable-images/unguessable_images.php:142

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

unguessable-images/unguessable_images.php 92% from 13 tests

Analyzing the main PHP file in "Unguessable Images" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("unguessable-images.php" instead of "unguessable_images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected229 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29514229

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.67
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
No PNG images were found in this plugin