10% wp-rajce-galerie

Code Review | WP Rajče galerie

WordPress plugin WP Rajče galerie scored10%from 54 tests.

About plugin

  • Plugin page: wp-rajce-galerie
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Apr 21, 2018
  • Number of updates: 10
  • Update frequency: every 112.5 days
  • Top authors: mikk_cz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,104 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Rajce_galerie_Options::install() should not be called statically

Server metrics [RAM: ▼0.95MB] [CPU: ▼37.89ms] Passed 4 tests

A check of server-side resources used by WP Rajče galerie
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.35 ▼8.83
Dashboard /wp-admin3.00 ▼0.3123.97 ▼31.55
Posts /wp-admin/edit.php3.00 ▼0.3624.83 ▼27.53
Add New Post /wp-admin/post-new.php3.00 ▼2.8924.94 ▼75.38
Media Library /wp-admin/upload.php3.00 ▼0.2322.96 ▼17.11

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
wp_rajce_galerie_cache_type
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
wp_rajce_galerie_cache_expire
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Rajče galerie
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▲0.061.69 ▼0.2845.76 ▲3.62
Dashboard /wp-admin2,202 ▲255.56 ▲0.0283.06 ▼20.4345.09 ▲1.29
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0039.03 ▲1.2137.23 ▲0.60
Add New Post /wp-admin/post-new.php1,531 ▲523.38 ▲0.40654.87 ▼20.8855.40 ▲0.98
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.11104.48 ▼1.5646.12 ▼2.97
WP Rajče galerie /wp-admin/WP_Rajce_galerie_Page.php260.420.0914.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Rajce_galerie_Options::add_menu() should not be called statically
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • wp_rajce_galerie_cache_type
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wp_rajce_galerie_cache_expire

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'WP_Rajce_galerie_Cache_Interface' not found in wp-content/plugins/wp-rajce-galerie/classes/WP_Rajce_galerie_Cache_File.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'WP_Rajce_galerie_Cache_Interface' not found in wp-content/plugins/wp-rajce-galerie/classes/WP_Rajce_galerie_Cache_Transients_API.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/WP_Rajce_galerie_Page.php
    • > Network (severe)
    wp-admin/WP_Rajce_galerie_Page.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Ukázka vložené galerie), #2 (Ukázka shortcode v editoru stránky)
The official readme.txt might help

wp-rajce-galerie/wp-rajce-galerie.php Passed 13 tests

"WP Rajče galerie" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
Plugin pro jednoduché zobrazení seznamu fotogalerií uživatele Rajče.net.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin347 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP869160321
CSS13026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods36
▷ Static methods38.33%
▷ Public methods2363.89%
▷ Protected methods00.00%
▷ Private methods1336.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.44MB with 0.24MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/background.png4.09KB2.68KB▼ 34.52%
screenshot-1.png411.87KB133.90KB▼ 67.49%
screenshot-2.png33.35KB13.43KB▼ 59.73%