84% ruven-themes-gallery

Code Review | Ruven Themes: Gallery

WordPress plugin Ruven Themes: Gallery scored84%from 54 tests.

About plugin

  • Plugin page: ruven-themes-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 7
  • Update frequency: every 16.0 days
  • Top authors: Ruven Themes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,212 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.66ms] Passed 4 tests

Analyzing server-side resources used by Ruven Themes: Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.16 ▲1.56
Dashboard /wp-admin3.36 ▲0.0544.52 ▼3.09
Posts /wp-admin/edit.php3.41 ▲0.0548.67 ▲1.78
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.39 ▼10.65
Media Library /wp-admin/upload.php3.28 ▲0.0535.93 ▲1.56
Categories /wp-admin/edit-tags.php?taxonomy=gallery-category&post_type=gallery3.2834.90
Add New /wp-admin/post-new.php?post_type=gallery3.4451.96
Galleries /wp-admin/edit.php?post_type=gallery3.3335.75

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • You have illegally modified 2 files (0.00KB) outside of "wp-content/plugins/ruven-themes-gallery/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/ruven-themes-gallery/assets/icon-128\303\227128.png"
    • (new file) "wp-content/plugins/ruven-themes-gallery/assets/icon-256\303\227256.png"
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Ruven Themes: Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.31 ▼1.441.71 ▲0.0141.83 ▲0.99
Dashboard /wp-admin2,234 ▲495.83 ▲0.9898.06 ▼4.3836.73 ▼3.26
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0641.18 ▲6.7334.49 ▼2.25
Add New Post /wp-admin/post-new.php1,564 ▲4323.32 ▲0.09608.88 ▼26.0951.53 ▲0.30
Media Library /wp-admin/upload.php1,413 ▲254.19 ▼0.0193.91 ▼8.5342.15 ▼2.87
Categories /wp-admin/edit-tags.php?taxonomy=gallery-category&post_type=gallery1,2932.1426.0327.50
Add New /wp-admin/post-new.php?post_type=gallery2,8307.91178.0374.43
Galleries /wp-admin/edit.php?post_type=gallery1,1431.9530.5930.80

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ruven-themes-gallery/ruven-themes-gallery.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: gallery, custom post type

ruven-themes-gallery/ruven-themes-gallery.php Passed 13 tests

"Ruven Themes: Gallery" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Extends the functionality of Ruven Themes by adding a Gallery post type

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected93 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1482693

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128×128.png4.56KB2.23KB▼ 51.08%
assets/icon-256×256.png4.07KB1.48KB▼ 63.59%