84% dd-rating

Code Review | DD Rating

WordPress plugin DD Rating scored84%from 54 tests.

About plugin

  • Plugin page: dd-rating
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8
  • WordPress version: 6.3.1
  • First release: Dec 2, 2013
  • Latest release: Jan 15, 2014
  • Number of updates: 13
  • Update frequency: every 3.4 days
  • Top authors: Mosterd3d (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.40ms] Passed 4 tests

A check of server-side resources used by DD Rating
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.97 ▲4.18
Dashboard /wp-admin3.44 ▲0.1351.89 ▲1.13
Posts /wp-admin/edit.php3.55 ▲0.2052.04 ▲3.14
Add New Post /wp-admin/post-new.php5.57 ▼0.3176.72 ▼16.90
Media Library /wp-admin/upload.php3.36 ▲0.1337.15 ▼0.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for DD Rating
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15514.12 ▼0.256.91 ▲4.9742.93 ▲3.83
Dashboard /wp-admin2,224 ▲184.87 ▼0.01111.59 ▲7.7142.17 ▲1.36
Posts /wp-admin/edit.php2,114 ▲172.06 ▲0.0740.29 ▲3.4432.89 ▲2.07
Add New Post /wp-admin/post-new.php6,575 ▲5,04426.18 ▲2.97857.40 ▲204.8360.07 ▼2.29
Media Library /wp-admin/upload.php1,401 ▲74.20 ▲0.0397.49 ▼5.7642.79 ▼2.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dd-rating/inc/add_to_comment.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dd-rating/inc/add_to_admin_posts.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dd-rating/inc/add_to_admin_comments.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dd-rating/inc/add_to_comment_form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/dd-rating/inc/google_rich_snippets.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dd-rating/inc/add_to_admin_comments.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dd-rating/inc/shortcode.php:169

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: review, comment, rating, average, stars...

dd-rating/dd_ratings.php 92% from 13 tests

The main PHP script in "DD Rating" version 1.7.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dd-rating.php" instead of "dd_ratings.php")

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
Success! There were no dangerous files found in this plugin1,335 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9248113827
CSS13212334
JavaScript17515174

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sprite_stars.png3.51KB2.35KB▼ 32.96%
images/stars_red.png2.00KB1.07KB▼ 46.45%
images/stars_grey50percent.png1.87KB1.02KB▼ 45.24%
images/menu.png8.95KB4.96KB▼ 44.64%
images/icons32.png12.68KB8.00KB▼ 36.94%