84% sierotki

Code Review | Orphans

WordPress plugin Orphans scored84%from 54 tests.

About plugin

  • Plugin page: sierotki
  • Plugin version: 3.2.5
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 16, 2011
  • Latest release: Nov 30, 2023
  • Number of updates: 209
  • Update frequency: every 22.3 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

150 reviews

Install metrics

30,000+ active /415,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.79MB] [CPU: ▲1.10ms] Passed 4 tests

An overview of server-side resources used by Orphans
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8042.51 ▼0.79
Dashboard /wp-admin4.09 ▲0.7952.94 ▲2.65
Posts /wp-admin/edit.php4.14 ▲0.7952.07 ▲4.27
Add New Post /wp-admin/post-new.php6.67 ▲0.7995.96 ▲5.79
Media Library /wp-admin/upload.php4.01 ▲0.7940.70 ▼1.75
Orphans /wp-admin/themes.php?page=iworks_orphan_index4.1538.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 24 new options
New WordPress options
iworks_orphan_attributes
db_upgraded
widget_recent-comments
iworks_orphan_menu_title
iworks_orphan_get_the_author_description
iworks_orphan_language
iworks_orphan_the_title
widget_theysaidso_widget
can_compress_scripts
iworks_orphan_taxonomies
...

Browser metrics Passed 4 tests

Checking browser requirements for Orphans
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.72 ▲0.371.68 ▼0.1136.61 ▼6.68
Dashboard /wp-admin2,202 ▲255.64 ▼0.0292.11 ▼13.6242.39 ▼4.80
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0739.48 ▲1.8635.42 ▼3.14
Add New Post /wp-admin/post-new.php1,529 ▲323.30 ▲0.30636.24 ▼51.1956.31 ▲8.76
Media Library /wp-admin/upload.php1,398 ▼24.20 ▼0.0295.58 ▼12.1242.53 ▼4.22
Orphans /wp-admin/themes.php?page=iworks_orphan_index1,7783.0289.6348.87

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 20 options
    • iworks_orphan_taxonomies
    • iworks_orphan_widget_text
    • iworks_orphan_attributes
    • iworks_orphan_widget_block_content
    • iworks_orphan_widget_title
    • iworks_orphan_post_type
    • widget_recent-posts
    • widget_theysaidso_widget
    • iworks_orphan_language
    • iworks_orphan_term_description
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/sierotki/sierotki.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4 in sierotki/assets to your readme.txt
Please take inspiration from this readme.txt

sierotki/sierotki.php Passed 13 tests

The primary PHP file in "Orphans" version 3.2.5 is used by WordPress to initiate all plugin functionality
44 characters long description:
Implement Polish grammar rules with orphans.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected5,224 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP135211,4644,568
JavaScript45088336
CSS6239181
Sass180138
SVG1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 193)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity184.00
▷ Minimum class complexity37.00
▷ Maximum class complexity392.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity193.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods198
▷ Static methods21.01%
▷ Public methods14472.73%
▷ Protected methods189.09%
▷ Private methods3618.18%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.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
7 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/iworks/options/assets/styles/images/ui-icons_777777_256x240.png3.46KB3.80KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_ffffff_256x240.png3.54KB3.86KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_777620_256x240.png3.50KB3.82KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_555555_256x240.png3.48KB3.81KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_444444_256x240.png3.50KB3.83KB0.00%