84% shalom-world-media-gallery

Code Review | SW Plus

WordPress plugin SW Plus scored84%from 54 tests.

About plugin

  • Plugin page: shalom-world-medi...
  • Plugin version: 2.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2019
  • Latest release: Jan 25, 2023
  • Number of updates: 14
  • Update frequency: every 105.1 days
  • Top authors: shalomworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.31ms] Passed 4 tests

Analyzing server-side resources used by SW Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.06 ▼2.87
Dashboard /wp-admin3.33 ▼0.0146.77 ▼12.88
Posts /wp-admin/edit.php3.38 ▲0.0349.07 ▼0.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.19 ▼21.25
Media Library /wp-admin/upload.php3.25 ▲0.0338.43 ▲5.41

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SW Plus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.76 ▲0.391.75 ▼0.0343.74 ▲2.87
Dashboard /wp-admin2,207 ▲275.63 ▲0.0089.79 ▼2.2041.97 ▼6.24
Posts /wp-admin/edit.php2,115 ▲152.00 ▼0.0139.68 ▲1.2238.52 ▲3.92
Add New Post /wp-admin/post-new.php1,538 ▲1223.04 ▼0.19630.03 ▼15.4158.92 ▲7.70
Media Library /wp-admin/upload.php1,412 ▲94.19 ▼0.01106.36 ▲10.4147.38 ▲5.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shalom-world-media-gallery/init.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
7 plugin tags: shalom world, shalom, media gallery, catholic content, shalomworldtv...

shalom-world-media-gallery/init.php 92% from 13 tests

Analyzing the main PHP file in "SW Plus" version 2.1
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shalom-world-media-gallery.php" instead of "init.php")

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
Everything looks great! No dangerous files found in this plugin157 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12435157

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 1.32MB with 0.82MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/instruction.png75.42KB32.10KB▼ 57.44%
images/instruction0.png710.74KB273.46KB▼ 61.52%
images/instruction1.png564.49KB182.13KB▼ 67.74%