10% 1-decembrie-1918

Code Review | 1 Decembrie 1918

WordPress plugin 1 Decembrie 1918 scored10%from 54 tests.

About plugin

  • Plugin page: 1-decembrie-1918
  • Plugin version: 1.dec.2012...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 29, 2012
  • Latest release: Jan 6, 2013
  • Number of updates: 15
  • Update frequency: every 2.6 days
  • Top authors: olarmarius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,539 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php+13
    Use of undefined constant UNU_DEC_1918_TEXTDOMAIN - assumed 'UNU_DEC_1918_TEXTDOMAIN' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.88ms] Passed 4 tests

Analyzing server-side resources used by 1 Decembrie 1918
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.397.59 ▼32.27
Dashboard /wp-admin2.09 ▼1.255.48 ▼54.65
Posts /wp-admin/edit.php2.10 ▼1.265.44 ▼43.73
Add New Post /wp-admin/post-new.php2.09 ▼3.796.09 ▼92.88
Media Library /wp-admin/upload.php2.09 ▼1.135.42 ▼30.46
1 Decembrie 1918 /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php2.105.66

Server storage [IO: ▲0.67MB] [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: 13 new files
Database: no new tables, 10 new options
New WordPress options
unudec1918_url
db_upgraded
widget_recent-posts
unudec1918_efect
unudec1918_title_text
widget_recent-comments
unudec1918_text
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 1 Decembrie 1918
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.63 ▼0.871.58 ▼0.0937.81 ▼3.64
Dashboard /wp-admin2,207 ▲166.02 ▲1.1598.01 ▼12.0141.52 ▼5.17
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0638.87 ▼3.8937.94 ▲2.16
Add New Post /wp-admin/post-new.php1,536 ▼623.33 ▲5.11598.98 ▼65.3956.67 ▲7.30
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0394.20 ▼4.2341.40 ▼3.71
1 Decembrie 1918 /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php8362.0623.7127.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php+13
    Use of undefined constant UNU_DEC_1918_TEXTDOMAIN - assumed 'UNU_DEC_1918_TEXTDOMAIN' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php
    • > Warning in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php+13
    Use of undefined constant UNU_DEC_1918_TEXTDOMAIN - assumed 'UNU_DEC_1918_TEXTDOMAIN' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php
    • > Notice in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php+49
    Undefined index: submit

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php:21
    • > PHP Warning
      Use of undefined constant UNU_DEC_1918_TEXTDOMAIN - assumed 'UNU_DEC_1918_TEXTDOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/1-decembrie-1918/1-decembrie-1918.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

1-decembrie-1918/1-decembrie-1918.php 92% from 13 tests

"1 Decembrie 1918" version 1.dec.2012...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.dec.2012...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13718111
PO File1101334

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.59MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/1-decembrie-1918-11.png7.97KB3.45KB▼ 56.75%
img/1-decembrie-1918-00.png2.07KB1.18KB▼ 43.15%
img/1-decembrie-1918-10.png5.96KB2.71KB▼ 54.48%
screenshot-2.png17.80KB6.26KB▼ 64.81%
img/1-decembrie-1918.png7.97KB3.45KB▼ 56.75%