84% the-swedish-word-of-the-day

Code Review | The Swedish Word Of The Day

WordPress plugin The Swedish Word Of The Day scored84%from 54 tests.

About plugin

  • Plugin page: the-swedish-word-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Dec 9, 2016
  • Number of updates: 43
  • Update frequency: every 8.9 days
  • Top authors: Fredster22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,970 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.41ms] Passed 4 tests

A check of server-side resources used by The Swedish Word Of The Day
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.13 ▲0.17
Dashboard /wp-admin3.32 ▲0.0152.18 ▲1.76
Posts /wp-admin/edit.php3.37 ▲0.0147.09 ▼1.48
Add New Post /wp-admin/post-new.php5.90 ▲0.01106.15 ▲9.74
Media Library /wp-admin/upload.php3.24 ▲0.0138.09 ▲1.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_swedishword_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Swedish Word Of The Day
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼0.961.89 ▲0.2642.71 ▼1.40
Dashboard /wp-admin2,203 ▲125.83 ▼0.0798.48 ▼6.8938.37 ▼3.15
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0435.33 ▼3.4131.26 ▼2.91
Add New Post /wp-admin/post-new.php1,537 ▲323.59 ▲0.51595.06 ▼86.5948.75 ▼0.08
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0397.12 ▼2.2741.75 ▼4.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_swedishword_widget
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-swedish-word-of-the-day/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: word of the day, swedish, language, svenska, swedish language...

the-swedish-word-of-the-day/index.php 85% from 13 tests

"The Swedish Word Of The Day" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("the-swedish-word-of-the-day.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1321877
CSS13016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ 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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected