84% wareki

Code Review | Wareki

WordPress plugin Wareki scored84%from 54 tests.

About plugin

  • Plugin page: wareki
  • Plugin version: 2.02
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 2, 2019
  • Latest release: Nov 2, 2023
  • Number of updates: 53
  • Update frequency: every 31.6 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.38ms] Passed 4 tests

This is a short check of server-side resources used by Wareki
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.80 ▼4.70
Dashboard /wp-admin3.38 ▲0.0347.77 ▼17.32
Posts /wp-admin/edit.php3.43 ▲0.0748.96 ▲1.05
Add New Post /wp-admin/post-new.php5.96 ▲0.07101.49 ▲2.33
Media Library /wp-admin/upload.php3.31 ▲0.0734.30 ▼0.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Wareki
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▲0.031.82 ▼0.2041.95 ▼0.06
Dashboard /wp-admin2,195 ▲155.63 ▼0.0190.99 ▲0.1538.92 ▲3.11
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0640.68 ▲3.6835.58 ▲1.84
Add New Post /wp-admin/post-new.php1,533 ▲522.98 ▼0.11590.51 ▼78.6348.55 ▼15.56
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.05100.71 ▲0.6341.93 ▼3.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 32× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wareki/lib/class-wareki.php:79
    • > PHP Warning
      Illegal offset type in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Warning
      Illegal offset type in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Warning
      Illegal offset type in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Warning
      Illegal offset type in wp-content/plugins/wareki/lib/class-wareki.php on line 75
    • > PHP Warning
      Illegal offset type in wp-content/plugins/wareki/lib/class-wareki.php on line 75

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: i18n, gengo, date, japanese

wareki/wareki.php Passed 13 tests

The primary PHP file in "Wareki" version 2.02 is used by WordPress to initiate all plugin functionality
97 characters long description:
Add a Japanese calendar including the era in date format, posts, comments, archives and calendar.

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
No dangerous file extensions were detected318 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP265162318

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity5.92
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods861.54%
▷ Protected methods00.00%
▷ Private methods538.46%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin