79% blog-time

Code Review | Blog Time

WordPress plugin Blog Time scored 79% from 54 tests.

About plugin

  • Plugin page: blog-time
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Jul 6, 2009
  • Latest release: Jul 29, 2021
  • Number of updates: 23
  • Update frequency: every 193.3 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active / 22,853 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.75ms] Passed 4 tests

An overview of server-side resources used by Blog Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.11 ▼4.66
Dashboard /wp-admin3.42 ▲0.1243.42 ▼8.13
Posts /wp-admin/edit.php3.53 ▲0.1849.12 ▲3.73
Add New Post /wp-admin/post-new.php6.02 ▲0.1393.90 ▼7.66
Media Library /wp-admin/upload.php3.34 ▲0.1137.00 ▲1.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_blog-time
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Blog Time
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲24013.84 ▼0.397.88 ▲6.0337.54 ▼13.97
Dashboard /wp-admin2,251 ▲605.89 ▲0.94107.62 ▲5.1742.68 ▲2.66
Posts /wp-admin/edit.php2,151 ▲832.37 ▲0.3734.24 ▼3.1333.64 ▲2.02
Add New Post /wp-admin/post-new.php1,530 ▲223.36 ▲5.21633.09 ▼16.4135.88 ▼26.76
Media Library /wp-admin/upload.php1,417 ▲324.50 ▲0.3299.66 ▲0.3441.07 ▼0.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_blog-time
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/blog-time/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/blog-time/tests/phpunit/bootstrap.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/blog-time/tests/phpunit/bootstrap.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: admin, template tag, blog, server, datetime...

blog-time/blog-time.php Passed 13 tests

Analyzing the main PHP file in "Blog Time" version 4.0.1
104 characters long description:
Display the time according to your blog via admin toolbar widget, a sidebar widget, and/or template tag.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin6,008 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript37603574,607
PHP63875391,031
Markdown3460313
CSS16322
Bourne Shell16221
XML10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity18.50
▷ Minimum class complexity3.00
▷ Maximum class complexity41.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods112
▷ Static methods2017.86%
▷ Public methods11199.11%
▷ Protected methods00.00%
▷ Private methods10.89%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin