10% flashlight

Code Review | Flashlight

WordPress plugin Flashlight scored10%from 54 tests.

About plugin

  • Plugin page: flashlight
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2015
  • Latest release: Dec 28, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Flaeron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /630 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/flashlight/flashlight.php+81
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.08ms] Passed 4 tests

An overview of server-side resources used by Flashlight
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.97 ▼0.12
Dashboard /wp-admin3.31 ▲0.0046.00 ▲0.79
Posts /wp-admin/edit.php3.36 ▲0.0045.55 ▼4.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.92 ▼11.86
Media Library /wp-admin/upload.php3.23 ▲0.0032.66 ▲0.38

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Flashlight
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.54 ▼0.831.91 ▼0.1446.02 ▲4.92
Dashboard /wp-admin2,203 ▲125.80 ▲0.8997.68 ▼8.8039.06 ▼2.76
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0436.68 ▼3.1032.15 ▼5.75
Add New Post /wp-admin/post-new.php1,514 ▼1917.42 ▼5.90667.32 ▼19.3756.08 ▼12.53
Media Library /wp-admin/upload.php1,382 ▼04.18 ▼0.0297.28 ▼3.7844.24 ▲0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/flashlight/flashlight.php on line 81

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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: plugin, flashlight

flashlight/flashlight.php Passed 13 tests

Analyzing the main PHP file in "Flashlight" version 1.0
47 characters long description:
The plugin creates a night version of the site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin332 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS100247
JavaScript14343
PHP1182142

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected