10% horoscope-feeder

Code Review | Horoscope Feeder

WordPress plugin Horoscope Feeder scored10%from 54 tests.

About plugin

  • Plugin page: horoscope-feeder
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2013
  • Latest release: Jun 28, 2013
  • Number of updates: 31
  • Update frequency: every 0.1 days
  • Top authors: tamasromeo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,554 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/horoscope-feeder/horoscop-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; HoroscopWidget has a deprecated constructor

Server metrics [RAM: ▼2.00MB] [CPU: ▼58.11ms] Passed 4 tests

An overview of server-side resources used by Horoscope Feeder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.465.76 ▼45.32
Dashboard /wp-admin2.29 ▼1.288.72 ▼45.77
Posts /wp-admin/edit.php2.29 ▼1.398.06 ▼42.78
Add New Post /wp-admin/post-new.php2.29 ▼3.867.47 ▼98.56
Media Library /wp-admin/upload.php2.29 ▼1.206.68 ▼29.91
Horoscope /wp-admin/options-general.php?page=horoscop-option-page2.295.92

Server storage [IO: ▲0.09MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
horoscop_settings
db_upgraded
widget_horoscopwidget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Horoscope Feeder: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.57 ▼1.048.60 ▲6.6044.36 ▼0.81
Dashboard /wp-admin2,206 ▲295.67 ▲0.0396.83 ▼5.2142.07 ▼6.68
Posts /wp-admin/edit.php2,108 ▲82.04 ▲0.0536.96 ▲0.7832.28 ▼1.16
Add New Post /wp-admin/post-new.php1,533 ▲223.42 ▲0.06641.72 ▼31.1463.80 ▼1.24
Media Library /wp-admin/upload.php1,405 ▲84.16 ▼0.04101.81 ▼3.1842.51 ▼2.45
Horoscope /wp-admin/options-general.php?page=horoscop-option-page1,4551.9940.9946.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/horoscope-feeder/horoscop-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; HoroscopWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_horoscopwidget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > Deprecated in wp-content/plugins/horoscope-feeder/horoscop-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; HoroscopWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > Deprecated in wp-content/plugins/horoscope-feeder/horoscop-widget.php+43
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in HoroscopWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/horoscope-feeder/horoscop-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/horoscope-feeder/horoscop-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: cToggle.live is not a function" "TypeError: cToggle.live is not a function\n at HTMLDivElement.\u003Canonymous> (/wp-content/plugins/horoscope-feeder/js/admin.js?ver=6.3.1:199:11)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:1594)\n at $.fn.easyTicker (/wp-content/plugins/horoscope-feeder/js/admin.js?ver=6.3.1:185:14)\n at HTMLDivElement.\u003Canonymous> (/wp-content/plugins/horoscope-feeder/js/admin.js?ver=6.3.1:44:8)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:1594)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/horoscope-feeder/js/admin.js?ver=6.3.1:40:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=horoscop-option-page
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28721 Uncaught TypeError: cToggle.live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in horoscope-feeder/assets to your readme.txt
Please take inspiration from this readme.txt

horoscope-feeder/horoscop-feeder.php 85% from 13 tests

"Horoscope Feeder" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("horoscope-feeder.php" instead of "horoscop-feeder.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 198 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,261 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36465904
JavaScript27116320
CSS23237

PHP code Passed 2 tests

Analyzing 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.36
Average class complexity32.00
▷ Minimum class complexity3.00
▷ Maximum class complexity74.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logos/rac.png5.61KB3.55KB▼ 36.65%
logos/berbec.png3.54KB2.48KB▼ 29.93%
logos/leu.png5.37KB3.50KB▼ 34.77%
logos/pesti.png5.03KB3.24KB▼ 35.48%
logos/scorpion.png3.81KB2.65KB▼ 30.44%