84% featured-galleries

Code Review | Featured Galleries

WordPress plugin Featured Galleries scored84%from 54 tests.

About plugin

  • Plugin page: featured-galleries
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Feb 27, 2014
  • Latest release: Aug 3, 2018
  • Number of updates: 91
  • Update frequency: every 17.8 days
  • Top authors: Kelderic (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

5,000+ active /34,513 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼12.01ms] Passed 4 tests

A check of server-side resources used by Featured Galleries
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.94 ▼1.89
Dashboard /wp-admin3.34 ▼0.0042.11 ▼13.89
Posts /wp-admin/edit.php3.39 ▲0.0442.96 ▼15.10
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.45 ▼17.16
Media Library /wp-admin/upload.php3.27 ▲0.0432.67 ▼1.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Featured Galleries: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▼0.111.66 ▼0.1040.68 ▼4.60
Dashboard /wp-admin2,192 ▲145.51 ▼0.2288.62 ▼10.2239.49 ▼5.77
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0233.10 ▼12.2334.91 ▼7.13
Add New Post /wp-admin/post-new.php6,253 ▲4,72719.35 ▼4.22886.72 ▲161.8056.53 ▲2.87
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0399.69 ▼8.8043.43 ▼5.24

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/featured-galleries/featured-galleries.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: featured, backend, images, admin, galleries

featured-galleries/featured-galleries.php 92% from 13 tests

The main PHP script in "Featured Galleries" version 2.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)

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
Everything looks great! No dangerous files found in this plugin212 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP316970181
PO File15829
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin