10% wp-horoscope

Code Review | WP Horoscope

WordPress plugin WP Horoscope scored10%from 54 tests.

About plugin

  • Plugin page: wp-horoscope
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2014
  • Latest release: Sep 17, 2014
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,293 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/wp-horoscope/wpHoroscope_Widget.php+9
    Uncaught Error: Class 'scbWidget' not found in wp-content/plugins/wp-horoscope/wpHoroscope_Widget.php:9
    Stack trace:
    #0 wp-content/plugins/wp-horoscope/wp-horoscope.php(14): include_once()
    #1 wp-content/plugins/wp-horoscope/scb/load.php(77): _wphoroscope_init()
    #2 wp-content/plugins/wp-horoscope/scb/load.php(36): scbLoad4::load()
    #3 wp-content/plugins/wp-horoscope/scb/load.php(90): scbLoad4::init()
    #4 wp-content/plugins/wp-horoscope/wp-horoscope.php(24): scb_init()
    #5 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #6 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.35ms] Passed 4 tests

This is a short check of server-side resources used by WP Horoscope
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.87 ▼4.08
Dashboard /wp-admin3.31 ▲0.0046.35 ▼5.42
Posts /wp-admin/edit.php3.36 ▲0.0047.68 ▼1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.26 ▼6.21
Media Library /wp-admin/upload.php3.23 ▲0.0036.63 ▲0.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Horoscope
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.141.71 ▲0.0642.73 ▼5.72
Dashboard /wp-admin2,206 ▲184.89 ▼0.0496.29 ▼16.4640.10 ▼1.29
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0139.09 ▲2.5534.35 ▲1.20
Add New Post /wp-admin/post-new.php1,542 ▲918.03 ▼5.19584.93 ▼96.7448.30 ▼4.17
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0295.44 ▼13.3642.45 ▼4.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-horoscope/scb/Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-horoscope/shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'scbWidget' not found in wp-content/plugins/wp-horoscope/wpHoroscope_Widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/wp-horoscope/scb/BoxesPage.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-horoscope/scb/load.php:32

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (shortcut), #2 (widget)
You can take inspiration from this readme.txt

wp-horoscope/wp-horoscope.php Passed 13 tests

This is the main PHP file of "WP Horoscope" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
WP Horoscope giúp hiển thị thông tin trong ngày của các cung hoàng đạo.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,777 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP176057862,718
CSS14137
JSON10022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes521.74%
▷ Concrete classes1878.26%
▷ Final classes00.00%
Methods185
▷ Static methods5630.27%
▷ Public methods14578.38%
▷ Protected methods2915.68%
▷ Private methods115.95%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 2.18MB with 1.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sutu.png18.01KB6.30KB▼ 65.05%
images/songtu.png18.12KB6.33KB▼ 65.04%
images/nhanma.png12.69KB5.24KB▼ 58.71%
images/maket.png15.71KB5.87KB▼ 62.62%
images/xunu.png17.21KB5.97KB▼ 65.29%