84% sinatra-core

Code Review | Sinatra Core

WordPress plugin Sinatra Core scored84%from 54 tests.

About plugin

  • Plugin page: sinatra-core
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 21, 2020
  • Latest release: Aug 30, 2023
  • Number of updates: 12
  • Update frequency: every 107.8 days
  • Top authors: sinatrateam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /120,241 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by Sinatra Core
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.86 ▼5.20
Dashboard /wp-admin3.32 ▲0.0145.72 ▲0.21
Posts /wp-admin/edit.php3.37 ▲0.0149.26 ▼3.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.13 ▼1.91
Media Library /wp-admin/upload.php3.24 ▲0.0136.33 ▲3.79

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 325 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sinatra Core
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.47 ▲0.091.76 ▲0.1240.59 ▼8.40
Dashboard /wp-admin2,213 ▲254.86 ▼1.07104.30 ▼4.1342.54 ▲2.70
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0036.80 ▼3.6333.55 ▼1.40
Add New Post /wp-admin/post-new.php1,531 ▼1123.18 ▲4.81634.68 ▲28.9854.78 ▲4.25
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0196.12 ▲1.8242.17 ▼0.64

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sinatra-core/includes/widgets/class-sinatra-core-social-links-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sinatra-core/includes/widgets/class-sinatra-core-posts-list-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sinatra-core/includes/widgets/class-sinatra-core-custom-list-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: custom blocks, demo website, demo template, blocks, demos...

sinatra-core/sinatra-core.php 85% from 13 tests

The entry point to "Sinatra Core" version 1.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

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
Good job! No executable or dangerous file extensions detected5,454 lines of code in 317 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,1421,6223,786
CSS8380999
SVG28800298
PO File1121131289
JavaScript3364282

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity36.05
▷ Minimum class complexity1.00
▷ Maximum class complexity185.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes947.37%
Methods150
▷ Static methods2214.67%
▷ Public methods13187.33%
▷ Protected methods10.67%
▷ Private methods1812.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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 images were found in this plugin