83% firmasite-options

Code Review | FirmaSite Options

WordPress plugin FirmaSite Options scored83%from 54 tests.

About plugin

  • Plugin page: firmasite-options
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Sep 11, 2013
  • Latest release: Sep 12, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: unsalkorkmaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by FirmaSite Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.27 ▲1.09
Dashboard /wp-admin3.31 ▼0.0343.96 ▼13.64
Posts /wp-admin/edit.php3.36 ▲0.0144.64 ▼0.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.23 ▼3.15
Media Library /wp-admin/upload.php3.24 ▲0.0134.71 ▲3.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for FirmaSite Options
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.60 ▼0.638.09 ▲6.3046.35 ▲4.71
Dashboard /wp-admin2,203 ▲115.84 ▼0.05105.87 ▼1.9840.84 ▼3.88
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.83 ▲1.9535.29 ▼0.77
Add New Post /wp-admin/post-new.php1,514 ▼517.81 ▼5.26663.63 ▼5.4348.93 ▼4.93
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0394.18 ▼0.5945.21 ▲1.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× 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/firmasite-options/theme-options/firmasite-layout.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/firmasite-options/theme-options/firmasite-style.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/firmasite-options/theme-options/firmasite-font.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/firmasite-options/theme-options/firmasite-loop-style.php:6

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Font), #2 (Layout), #3 (Loop Style), #4 (Theme Style)
You can take inspiration from this readme.txt

firmasite-options/theme-options.php 92% from 13 tests

The main file in "FirmaSite Options" 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: Please rename the main PHP file in this plugin to the plugin slug ("firmasite-options.php" instead of "theme-options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected282 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53745222
PO File1204460

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.66
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%
Functions12
▷ Named functions12100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.81MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png221.21KB133.54KB▼ 39.63%
screenshot-2.png212.72KB127.29KB▼ 40.16%
screenshot-1.png187.90KB106.05KB▼ 43.56%
screenshot-4.png212.39KB126.69KB▼ 40.35%