84% squarefox-save-shortcut

Code Review | SquareFox Save Shortcut

WordPress plugin SquareFox Save Shortcut scored84%from 54 tests.

About plugin

  • Plugin page: squarefox-save-sh...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: May 16, 2018
  • Latest release: May 18, 2018
  • Number of updates: 31
  • Update frequency: every 0.1 days
  • Top authors: squarefox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by SquareFox Save Shortcut
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.18 ▼2.11
Dashboard /wp-admin3.31 ▲0.0160.42 ▲8.27
Posts /wp-admin/edit.php3.37 ▲0.0053.01 ▲1.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0288.39 ▼7.13
Media Library /wp-admin/upload.php3.24 ▲0.0036.31 ▲2.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SquareFox Save Shortcut
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.201.83 ▲0.2144.32 ▼0.15
Dashboard /wp-admin2,200 ▲205.56 ▼0.1098.54 ▲8.3441.77 ▼0.30
Posts /wp-admin/edit.php2,102 ▲22.02 ▼0.0235.22 ▼2.8134.31 ▼5.27
Add New Post /wp-admin/post-new.php1,528 ▼023.42 ▲0.14642.70 ▼27.9552.76 ▼3.71
Media Library /wp-admin/upload.php1,402 ▲24.21 ▲0.01102.33 ▼0.8644.29 ▼0.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/squarefox-save-shortcut/sq_save_shortcut.php:25

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 important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: simple, save, keyboard, shortcut, command

squarefox-save-shortcut/sq_save_shortcut.php 92% from 13 tests

"SquareFox Save Shortcut" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("squarefox-save-shortcut.php" instead of "sq_save_shortcut.php")

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
Success! There were no dangerous files found in this plugin52 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript120228
PHP1121615
HTML1109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin