68% spotlightr

Code Review | Spotlightr

WordPress plugin Spotlightr scored68%from 54 tests.

About plugin

  • Plugin page: spotlightr
  • Plugin version: 0.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Nov 14, 2023
  • Number of updates: 25
  • Update frequency: every 17.9 days
  • Top authors: socratous139 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,831 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼33.43ms] Passed 4 tests

Analyzing server-side resources used by Spotlightr
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.24 ▼4.52
Dashboard /wp-admin3.02 ▼0.3224.00 ▼38.62
Posts /wp-admin/edit.php3.02 ▼0.3323.54 ▼22.32
Add New Post /wp-admin/post-new.php3.02 ▼2.8621.85 ▼66.53
Media Library /wp-admin/upload.php3.02 ▼0.2125.87 ▼6.23
Playlists /wp-admin/admin.php?page=spotlightr_playlist3.0222.41
Quizzes /wp-admin/admin.php?page=spotlightr_quiz3.0221.32
Videos /wp-admin/admin.php?page=spotlightr_videolist3.0222.91
Settings /wp-admin/admin.php?page=spotlightr3.0224.40
Gallery /wp-admin/admin.php?page=spotlightr_gallery3.0220.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Spotlightr
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,070 ▲32322.08 ▲7.371.90 ▲0.2124.28 ▼20.66
Dashboard /wp-admin2,468 ▲28712.56 ▲6.88282.50 ▲177.60160.47 ▲118.69
Posts /wp-admin/edit.php2,422 ▲32211.57 ▲9.56110.60 ▲77.06156.46 ▲123.41
Add New Post /wp-admin/post-new.php6,410 ▲4,88428.68 ▲5.62766.49 ▲169.7778.52 ▲26.02
Media Library /wp-admin/upload.php1,556 ▲15612.64 ▲8.48134.53 ▲36.3871.60 ▲29.85
Playlists /wp-admin/admin.php?page=spotlightr_playlist1,99312.66118.70183.95
Quizzes /wp-admin/admin.php?page=spotlightr_quiz1,99312.47112.32160.97
Videos /wp-admin/admin.php?page=spotlightr_videolist1,99312.36121.74169.31
Settings /wp-admin/admin.php?page=spotlightr1,33111.1392.85140.05
Gallery /wp-admin/admin.php?page=spotlightr_gallery1,99312.76109.6868.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 108 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=spotlightr_gallery
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/spotlightr/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/spotlightr/add-group.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spotlightr/add-video.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spotlightr/quiz.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spotlightr/playlist.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spotlightr/add-video.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spotlightr/gallery.php:15

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: hosting, video, embed, streaming

spotlightr/spotlightr.php Passed 13 tests

The entry point to "Spotlightr" version 0.1.9 is a PHP file that has certain tags in its header comment area
38 characters long description:
Video for Small Businesses & Big Ideas

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 plugin3,038 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14177341,471
PHP9130101,367
CSS2376189
JSON10010
Markdown1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods40
▷ Static methods12.50%
▷ Public methods3997.50%
▷ Protected methods00.00%
▷ Private methods12.50%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/img/icon.png1.25KB0.66KB▼ 47.18%