68% ojama-flying-sankocho

Code Review | Ojama Flying Sankocho

WordPress plugin Ojama Flying Sankocho scored68%from 54 tests.

About plugin

  • Plugin page: ojama-flying-sank...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: May 20, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 11
  • Update frequency: every 48.9 days
  • Top authors: strix-bubol5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,117 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.88ms] Passed 4 tests

An overview of server-side resources used by Ojama Flying Sankocho
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.66 ▼2.39
Dashboard /wp-admin3.36 ▲0.0246.10 ▼12.21
Posts /wp-admin/edit.php3.48 ▲0.1243.22 ▼3.39
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.74 ▼13.53
Media Library /wp-admin/upload.php3.29 ▲0.0637.86 ▲3.04
Flying Sankocho plugin Option /wp-admin/options-general.php?page=flyjpf_plugin_options3.2332.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ojama Flying Sankocho
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.79 ▼0.569.63 ▲7.9737.85 ▼4.38
Dashboard /wp-admin2,202 ▲325.57 ▼0.0884.22 ▼19.0637.30 ▼2.39
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0235.77 ▼5.3831.32 ▼2.48
Add New Post /wp-admin/post-new.php1,534 ▲823.19 ▲0.14606.29 ▼24.0655.25 ▼6.36
Media Library /wp-admin/upload.php1,401 ▲44.19 ▼0.01106.82 ▲5.3744.51 ▲0.55
Flying Sankocho plugin Option /wp-admin/options-general.php?page=flyjpf_plugin_options8992.1526.3334.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Ojama_Flying_sankocho::at_uninstall() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=flyjpf_plugin_options
    • > Notice in wp-content/plugins/ojama-flying-sankocho/flying_jpf.php+265
    Undefined index: HTTP_ACCEPT_LANGUAGE

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ojama-flying-sankocho/flying_jpf.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots do not have images: #1 (Japanese Paradise Flycatcher.), #2 (Option page english.)
Please take inspiration from this readme.txt

ojama-flying-sankocho/flying_jpf.php 92% from 13 tests

The main file in "Ojama Flying Sankocho" 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ojama-flying-sankocho.php" instead of "flying_jpf.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
Good job! No executable or dangerous file extensions detected870 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13228580
PHP14343245
CSS15045

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
Functions1
▷ Named functions1100.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
3 compressed PNG files occupy 0.09MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
san1.png29.30KB30.77KB0.00%
san0.png40.49KB43.11KB0.00%
moon.png17.27KB18.53KB0.00%