84% browser-fullscreen-button

Code Review | Browser fullscreen Button

WordPress plugin Browser fullscreen Button scored84%from 54 tests.

About plugin

  • Plugin page: browser-fullscree...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 4
  • Update frequency: every 82.8 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Browser fullscreen Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.59 ▼0.60
Dashboard /wp-admin3.31 ▼0.0446.72 ▼15.19
Posts /wp-admin/edit.php3.36 ▲0.0043.87 ▼3.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.77 ▲5.18
Media Library /wp-admin/upload.php3.23 ▲0.0036.93 ▲2.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Browser fullscreen Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.031.84 ▲0.1444.47 ▲4.65
Dashboard /wp-admin2,198 ▲215.58 ▼0.1589.93 ▲3.0539.31 ▲3.11
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0040.57 ▼1.7136.54 ▼1.20
Add New Post /wp-admin/post-new.php1,526 ▼223.69 ▲0.52664.88 ▲72.1748.58 ▼13.29
Media Library /wp-admin/upload.php1,400 ▼04.10 ▼0.06110.91 ▲8.2346.05 ▲2.41

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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_shortcode() in wp-content/plugins/browser-fullscreen-button/BrowserFullscreenButton.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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
1 plugin tags: fullscreen

browser-fullscreen-button/BrowserFullscreenButton.php 92% from 13 tests

The main file in "Browser fullscreen Button" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("browser-fullscreen-button.php" instead of "BrowserFullscreenButton.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171050

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for 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 complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected