84% epoch

Code Review | Epoch - A native Disqus alternative with a focus on speed and privacy

WordPress plugin Epoch - A native Disqus alternative with a focus on speed and privacy scored84%from 54 tests.

About plugin

  • Plugin page: epoch
  • Plugin version: 1.0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: Dec 17, 2015
  • Number of updates: 63
  • Update frequency: every 3.4 days
  • Top authors: cyberhobo (47.62%)vernal (28.57%)Shelob9 (26.98%)

Code review

54 tests

User reviews

21 reviews

Install metrics

100+ active /27,251 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Epoch - A native Disqus alternative with a focus on speed and privacy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.10 ▼0.3726.25 ▼18.45
Dashboard /wp-admin3.47 ▲0.1250.39 ▼14.09
Posts /wp-admin/edit.php3.59 ▲0.2350.66 ▼3.27
Add New Post /wp-admin/post-new.php6.07 ▲0.18100.44 ▼9.80
Media Library /wp-admin/upload.php3.40 ▲0.1637.37 ▼0.88
Epoch /wp-admin/options-general.php?page=epoch3.3934.98

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options
epoch_ver
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Epoch - A native Disqus alternative with a focus on speed and privacy: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲14413.74 ▼0.4319.35 ▲17.3545.90 ▲2.00
Dashboard /wp-admin2,196 ▲225.60 ▼0.0892.74 ▲1.1840.73 ▼2.16
Posts /wp-admin/edit.php2,107 ▲42.04 ▲0.0639.96 ▼1.9535.61 ▼7.57
Add New Post /wp-admin/post-new.php1,529 ▲323.51 ▲0.07681.28 ▼16.9664.66 ▲10.20
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0298.79 ▼16.7042.26 ▼8.00
Epoch /wp-admin/options-general.php?page=epoch1,3516.06120.8952.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • epoch_ver
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'postmatic\\epoch\\front\\vars' not found in wp-content/plugins/epoch/classes/front/api_paths.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'postmatic\\epoch\\core' not found in wp-content/plugins/epoch/classes/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'postmatic\\epoch\\core' not found in wp-content/plugins/epoch/bootstrap.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/epoch/vendor/calderawp/magic-tags/tests/tests-get_var.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function epoch_postmatic_link() in wp-content/plugins/epoch/includes/templates/about-panel.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/epoch/includes/templates/comment-template.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'postmatic\\epoch\\options' not found in wp-content/plugins/epoch/includes/edit.php:11
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/epoch/vendor/calderawp/magic-tags/tests/bootstrap.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'postmatic\\epoch\\options' not found in wp-content/plugins/epoch/classes/front/templates/initial.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function epoch_postmatic_link() in wp-content/plugins/epoch/includes/templates/postmatic-panel.php:30

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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 require attention:
  • Tags: You are using too many tags: 23 tag instead of maximum 10
You can look at the official readme.txt

epoch/plugincore.php 92% from 13 tests

This is the main PHP file of "Epoch - A native Disqus alternative with a focus on speed and privacy" version 1.0.14, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("epoch.php" instead of "plugincore.php")

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
There were no executable files found in this plugin25,364 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113,0642,37619,419
CSS10424672,697
PHP359151,6512,401
PO File3131146428
JSON420159
HTML211096
Markdown324071
Bourne Shell115459
SVG10020
XML10014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.06
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods132
▷ Static methods3728.03%
▷ Public methods10579.55%
▷ Protected methods1914.39%
▷ Private methods86.06%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants5
▷ Global constants5100.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
10 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/postmatic-white.png23.92KB13.64KB▼ 42.96%
assets/image/logo.png11.06KB6.26KB▼ 43.44%
vendor/calderawp/magic-tags/tests/data/run-action-banner.png35.44KB11.72KB▼ 66.92%
assets/image/love.png30.78KB14.74KB▼ 52.09%
assets/image/configure.png2.52KB2.17KB▼ 14.10%