10% show-star-sign-widget

Code Review | Show Star Sign Widget

WordPress plugin Show Star Sign Widget scored10%from 54 tests.

About plugin

  • Plugin page: show-star-sign-wi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.0
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Dec 14, 2013
  • Number of updates: 4
  • Update frequency: every 63.5 days
  • Top authors: DuncanMarshall (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,913 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/show-star-sign-widget/show_star_sign.php+453
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼55.93ms] Passed 4 tests

Server-side resources used by Show Star Sign Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.305.11 ▼39.96
Dashboard /wp-admin2.19 ▼1.125.62 ▼53.06
Posts /wp-admin/edit.php2.19 ▼1.177.68 ▼43.37
Add New Post /wp-admin/post-new.php2.19 ▼3.707.59 ▼87.31
Media Library /wp-admin/upload.php2.19 ▼1.045.42 ▼32.74

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_show_star_sign_widget
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Star Sign Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.06 ▼0.172.05 ▲0.1542.63 ▼6.28
Dashboard /wp-admin2,195 ▲215.62 ▼0.0190.67 ▼10.2741.89 ▼5.36
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0038.99 ▲1.8734.59 ▼1.44
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.33690.45 ▲0.7156.31 ▼0.02
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0095.93 ▼5.9442.80 ▼3.31

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
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/show-star-sign-widget/show_star_sign.php+453
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_show_star_sign_widget

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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-star-sign-widget/show_star_sign.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: current, sign, sidebar, zodiac, astrology...

show-star-sign-widget/show_star_sign.php 92% from 13 tests

"Show Star Sign Widget" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("show-star-sign-widget.php" instead of "show_star_sign.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin267 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117120267

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity8.17
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
90 PNG files occupy 0.74MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/000000/showcurrentsign.png4.08KB1.00KB▼ 75.53%
images/000000/pisces.png8.82KB4.61KB▼ 47.75%
images/000000/showmysign.png3.92KB0.90KB▼ 77.10%
images/000000/sagittarius.png9.16KB5.12KB▼ 44.18%
images/ffffff/scorpio.png8.25KB4.27KB▼ 48.22%