10% casia-opening-times

Code Review | Casia Opening Times

WordPress plugin Casia Opening Times scored10%from 54 tests.

About plugin

  • Plugin page: casia-opening-times
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Mar 6, 2019
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: castellar120 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /461 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/casia-opening-times/casia-opening-times.php+280
    Undefined index: casot_days

Server metrics [RAM: ▼0.62MB] [CPU: ▼24.06ms] Passed 4 tests

A check of server-side resources used by Casia Opening Times
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.93 ▼5.30
Dashboard /wp-admin3.38 ▲0.0452.24 ▼13.66
Posts /wp-admin/edit.php3.43 ▲0.0757.03 ▼2.39
Add New Post /wp-admin/post-new.php3.21 ▼2.6737.37 ▼74.89
Media Library /wp-admin/upload.php3.30 ▲0.0740.04 ▲2.47
Establishments /wp-admin/edit.php?post_type=casot_establishment3.3639.63

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Casia Opening Times
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.40 ▼1.207.72 ▲6.1939.00 ▲1.16
Dashboard /wp-admin2,227 ▲535.58 ▼0.0094.99 ▲7.2741.88 ▼1.63
Posts /wp-admin/edit.php2,126 ▲231.98 ▲0.0234.61 ▼8.3531.75 ▼7.24
Add New Post /wp-admin/post-new.php1,557 ▲3123.40 ▲0.20647.96 ▼24.5950.09 ▼6.71
Media Library /wp-admin/upload.php1,423 ▲264.15 ▼0.0398.35 ▼21.4542.75 ▼6.92
Establishments /wp-admin/edit.php?post_type=casot_establishment1,1481.9736.3430.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/casia-opening-times/casia-opening-times.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
No tags were detected

casia-opening-times/casia-opening-times.php 85% from 13 tests

The main file in "Casia Opening Times" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 647 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin319 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13793245
CSS210060
JavaScript13014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin