67% synced-daily-deals

Code Review | Synced Daily Deals

WordPress plugin Synced Daily Deals scored67%from 54 tests.

About plugin

  • Plugin page: synced-daily-deals
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Oct 30, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: catalin.i (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /967 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.59ms] Passed 4 tests

Server-side resources used by Synced Daily Deals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.53 ▼10.15
Dashboard /wp-admin3.41 ▲0.0647.72 ▼15.81
Posts /wp-admin/edit.php3.46 ▲0.1047.46 ▼3.60
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.16 ▼0.79
Media Library /wp-admin/upload.php3.33 ▲0.1040.90 ▲2.44
Add New /wp-admin/post-new.php?post_type=product3.4645.53
Online Offers /wp-admin/admin.php?page=wp_synced_offers3.3036.00
All Products /wp-admin/edit.php?post_type=product3.3735.70
Categories /wp-admin/admin.php?page=wp_synced_categories3.3033.54
Synced /wp-admin/admin.php?page=wp-synced-menu3.3334.33
Merchants /wp-admin/admin.php?page=wp_synced_merchants3.3030.14

Server storage [IO: ▲0.11MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 23 new files
Database: 6 new tables, 7 new options
New tables
wp_synced_programs
wp_synced_countries
wp_synced_settings
wp_synced_offers
wp_synced_merchants
wp_synced_categories
New WordPress options
_synced_admin_notice
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Synced Daily Deals
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10114.24 ▼0.111.51 ▼0.2538.81 ▼2.92
Dashboard /wp-admin2,271 ▲975.56 ▼0.0280.50 ▼8.9272.23 ▲29.10
Posts /wp-admin/edit.php2,176 ▲762.00 ▲0.0439.80 ▲1.3934.66 ▼0.69
Add New Post /wp-admin/post-new.php1,752 ▲22424.56 ▲1.39618.18 ▼67.0342.23 ▼10.62
Media Library /wp-admin/upload.php1,470 ▲734.12 ▲0.01100.33 ▼2.2961.46 ▲14.12
Add New /wp-admin/post-new.php?post_type=product2,4877.73176.56113.93
Online Offers /wp-admin/admin.php?page=wp_synced_offers9722.1822.7225.10
All Products /wp-admin/edit.php?post_type=product1,1801.9129.8229.84
Categories /wp-admin/admin.php?page=wp_synced_categories8662.0026.9426.11
Synced /wp-admin/admin.php?page=wp-synced-menu1,2892.0024.3230.62
Merchants /wp-admin/admin.php?page=wp_synced_merchants9192.0122.6723.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_synced_merchants
    • wp_synced_settings
    • wp_synced_programs
    • wp_synced_categories
    • wp_synced_offers
    • wp_synced_countries
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • _synced_admin_notice
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/synced-daily-deals/views/admin/wp_synced_menu.php
    • > /wp-content/plugins/synced-daily-deals/views/admin/wp_synced_categories_edit.php
    • > /wp-content/plugins/synced-daily-deals/views/admin/wp_synced_categories_menu.php
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_categories_menu.php on line 38
    • > PHP Notice
      Trying to get property 'input_search' of non-object in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_online_offers_menu.php on line 16
    • > PHP Notice
      Trying to get property 'input_search' of non-object in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_online_offers_menu.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_online_offers_menu.php on line 16
    • > PHP Notice
      Trying to get property 'input_search' of non-object in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_online_offers_menu.php on line 13
    • > PHP Notice
      Undefined variable: z in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_merchants_menu.php on line 14
    • > PHP Notice
      Undefined variable: z in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_online_offers_menu.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function paginate_links() in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_merchants_menu.php:21
    • > PHP Notice
      Undefined variable: z in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_merchants_menu.php on line 20
    • > PHP Notice
      Trying to get property 'input_search' of non-object in wp-content/plugins/synced-daily-deals/views/admin/wp_synced_merchants_menu.php on line 14

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

readme.txt 88% 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:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
  • Tested up to: Version format is invalid
Please take inspiration from this readme.txt

synced-daily-deals/wpsynced.php 85% from 13 tests

This is the main PHP file of "Synced Daily Deals" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("synced-daily-deals.php" instead of "wpsynced.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "3.8")

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
Good job! No executable or dangerous file extensions detected1,900 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14369701,326
CSS16121539
XML20021
HTML19014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.25
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icons/144.png3.69KB0.33KB▼ 91.00%