10% sewol-count

Code Review | Sewol Count

WordPress plugin Sewol Count scored 10% from 54 tests.

About plugin

  • Plugin page: sewol-count
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2015
  • Latest release: Apr 1, 2019
  • Number of updates: 38
  • Update frequency: every 37.9 days
  • Top authors: pangol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 816 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/sewol-count/sewol-count.php+47
    Methods with the same name as their class will not be constructors in a future version of PHP; sewol_widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.15ms] Passed 4 tests

Analyzing server-side resources used by Sewol Count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.71 ▼38.11
Dashboard /wp-admin2.09 ▼1.216.72 ▼37.90
Posts /wp-admin/edit.php2.09 ▼1.266.46 ▼40.86
Add New Post /wp-admin/post-new.php2.09 ▼3.795.56 ▼87.72
Media Library /wp-admin/upload.php2.09 ▼1.136.44 ▼31.28

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_sewol_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sewol Count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.131.70 ▼0.1346.08 ▲3.26
Dashboard /wp-admin2,206 ▲184.85 ▼0.12110.32 ▲1.8141.96 ▼2.76
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0440.38 ▲0.0935.77 ▼0.33
Add New Post /wp-admin/post-new.php1,514 ▼1917.87 ▼5.56684.56 ▲10.3660.30 ▲13.83
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0297.72 ▼1.8341.90 ▼1.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sewol-count/sewol-count.php+47
    Methods with the same name as their class will not be constructors in a future version of PHP; sewol_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_sewol_widget
    • widget_theysaidso_widget
    • db_upgraded
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sewol-count/sewol-count.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of widget setting), #2 (Screenshot of plugin in action)
You can look at the official readme.txt

sewol-count/sewol-count.php Passed 13 tests

This is the main PHP file of "Sewol Count" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
count day after Sewol Ferry Disaster

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
There were no executable files found in this plugin109 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172481
PO File16628

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshoot-1.png4.91KB3.51KB▼ 28.45%
screenshoot-2.png1.14KB1.13KB▼ 0.77%