84% better-datelines

Code Review | Better Datelines

WordPress plugin Better Datelines scored84%from 54 tests.

About plugin

  • Plugin page: better-datelines
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Feb 19, 2014
  • Latest release: Feb 19, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rinatkhaziev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /911 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.59ms] Passed 4 tests

Analyzing server-side resources used by Better Datelines
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.66 ▼1.43
Dashboard /wp-admin3.31 ▼0.0343.99 ▼16.93
Posts /wp-admin/edit.php3.36 ▲0.0146.32 ▲1.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.50 ▼5.13
Media Library /wp-admin/upload.php3.23 ▲0.0136.88 ▲3.54

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Better Datelines
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.031.81 ▼0.0243.23 ▼0.82
Dashboard /wp-admin2,206 ▲174.84 ▼0.21107.59 ▼2.8544.66 ▲1.04
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0139.80 ▲4.4934.71 ▼4.15
Add New Post /wp-admin/post-new.php1,519 ▼023.12 ▼0.08660.51 ▼10.4051.51 ▼14.20
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0295.03 ▼9.0742.89 ▼4.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-datelines/better-datelines.php:26

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)
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot of a post with a dateline) image required
Please take inspiration from this readme.txt

better-datelines/better-datelines.php Passed 13 tests

"Better Datelines" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
106 characters long description:
Use meta field to store dateline so that datelines aren't included in autoexcerpts and the_content as well

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
Everything looks great! No dangerous files found in this plugin54 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.27MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png116.19KB34.17KB▼ 70.60%
screenshot-1.png164.81KB57.52KB▼ 65.10%