68% content-egg

Code Review | Content Egg

WordPress plugin Content Egg scored68%from 54 tests.

About plugin

  • Plugin page: content-egg
  • Plugin version: 6.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Aug 21, 2023
  • Number of updates: 125
  • Update frequency: every 23.3 days
  • Top authors: keywordrush (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

30,000+ active /529,479 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.94MB] [CPU: ▲27.81ms] Passed 4 tests

Server-side resources used by Content Egg
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.18 ▲3.7269.59 ▲32.28
Dashboard /wp-admin7.33 ▲4.0278.23 ▲26.50
Posts /wp-admin/edit.php7.38 ▲4.0270.57 ▲17.52
Add New Post /wp-admin/post-new.php9.91 ▲4.02131.82 ▲34.95
Media Library /wp-admin/upload.php7.25 ▲4.0271.95 ▲35.61
Products /wp-admin/admin.php?page=content-egg-product7.3361.64
/wp-admin/options.php?page=content-egg-modules--RssFetcher7.6267.17
/wp-admin/options.php?page=content-egg-modules--Pixabay7.6264.36
Add autoblogging /wp-admin/admin.php?page=content-egg-autoblog-edit7.4161.07
/wp-admin/options.php?page=content-egg-modules--AffilinetCoupons7.6266.28
Modules /wp-admin/admin.php?page=content-egg-modules7.2660.05
/wp-admin/options.php?page=content-egg-modules--Youtube7.6264.98
Autoblogging /wp-admin/admin.php?page=content-egg-autoblog7.4862.05
/wp-admin/options.php?page=content-egg-modules--GdeSlon7.6266.07
Fill /wp-admin/admin.php?page=content-egg-prefill7.2862.29

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 449 new files
Database: 4 new tables, 28 new options
New tables
wp_cegg_price_alert
wp_cegg_product
wp_cegg_price_history
wp_cegg_autoblog
New WordPress options
widget_cegg_price_movers
content-egg_GdeSlon
content-egg_GoogleImages
content-egg_RelatedKeywords
content-egg_Feed__1
content-egg_AdmitadProducts
widget_cegg_product_search
content-egg_ae_integration
content-egg_AffilinetCoupons
content-egg_RssFetcher
...

Browser metrics Passed 4 tests

An overview of browser requirements for Content Egg
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,012 ▲25113.78 ▼0.626.54 ▲4.8449.10 ▲5.13
Dashboard /wp-admin2,318 ▲1185.85 ▲0.9898.91 ▼3.5637.20 ▼5.79
Posts /wp-admin/edit.php2,203 ▲1032.13 ▲0.1242.08 ▼0.5034.61 ▲1.55
Add New Post /wp-admin/post-new.php1,581 ▲5022.41 ▼0.83663.44 ▲0.1861.27 ▲9.45
Media Library /wp-admin/upload.php1,504 ▲1074.27 ▼0.0398.36 ▼3.8342.40 ▲1.29
Products /wp-admin/admin.php?page=content-egg-product1,2571.8026.9442.25
/wp-admin/options.php?page=content-egg-modules--RssFetcher1,1261.8929.8740.17
/wp-admin/options.php?page=content-egg-modules--Pixabay1,3792.1226.3532.00
Add autoblogging /wp-admin/admin.php?page=content-egg-autoblog-edit1,8902.2038.8648.70
/wp-admin/options.php?page=content-egg-modules--AffilinetCoupons1,3372.1428.1534.91
Modules /wp-admin/admin.php?page=content-egg-modules1,0691.7626.2334.45
/wp-admin/options.php?page=content-egg-modules--Youtube1,2252.1228.8834.23
Autoblogging /wp-admin/admin.php?page=content-egg-autoblog1,2221.9029.1234.62
/wp-admin/options.php?page=content-egg-modules--GdeSlon1,3042.2427.0433.53
Fill /wp-admin/admin.php?page=content-egg-prefill1,4162.0333.7535.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_cegg_price_alert
    • wp_cegg_product
    • wp_cegg_price_history
    • wp_cegg_autoblog
  • The uninstall procedure has failed, leaving 27 options in the database
    • content-egg_Offer
    • content-egg_Coupon
    • content-egg_SkimlinksCoupons
    • content-egg_GdeSlon
    • content-egg_RssFetcher
    • content-egg_ae_integration
    • content-egg_GoogleImages
    • content-egg_CjLinks
    • content-egg_Freebase
    • widget_cegg_price_movers
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/content-egg/templates/wdgt_price_movers_list.php
    • > /wp-content/plugins/content-egg/content-egg.php
  • 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-egg/templates/block_offers_tile.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ContentEgg\\application\\helpers\\TemplateHelper' not found in wp-content/plugins/content-egg/templates/block_product_images_row.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-egg/templates/block_price_statistics.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ContentEgg\\application\\helpers\\TemplateHelper' not found in wp-content/plugins/content-egg/templates/block_top_listing.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ContentEgg\\application\\helpers\\TemplateHelper' not found in wp-content/plugins/content-egg/templates/block_offers_list_no_price.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-egg/templates/block_offers_list_groups.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-egg/templates/block_price_alert.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-egg/templates/block_offers_list.php:9
    • > PHP Notice
      Undefined variable: items in wp-content/plugins/content-egg/templates/wdgt_price_movers_list.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/content-egg/templates/block_popup_compare.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (44 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

content-egg/content-egg.php Passed 13 tests

The main file in "Content Egg" v. 6.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
52 characters long description:
All in one solution for creating affiliate websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin44,486 lines of code in 327 files:
LanguageFilesBlank linesComment linesLines of code
PHP2875,3823,39131,544
CSS9283546,617
JavaScript231,1338883,967
PO File58251,9991,873
SVG100288
Markdown1660168
XML10029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.87
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces42
Interfaces3
Traits0
Classes188
▷ Abstract classes168.51%
▷ Concrete classes17291.49%
▷ Final classes00.00%
Methods1,387
▷ Static methods48034.61%
▷ Public methods1,21487.53%
▷ Protected methods493.53%
▷ Private methods1248.94%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants139
▷ Global constants85.76%
▷ Class constants13194.24%
▷ Public constants131100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
52 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/logos/amazon-ca.png4.47KB3.13KB▼ 30.07%
res/css/images/ui-icons_2e83ff_256x240.png4.51KB4.18KB▼ 7.28%
res/css/images/ui-icons_cd0a0a_256x240.png4.51KB4.18KB▼ 7.28%
res/img/logo.png6.38KB3.23KB▼ 49.30%
res/logos/amazon-nl.png4.47KB3.13KB▼ 30.07%