10% 1-decembrie-1918

Code Review | 1 Decembrie 1918

WordPress plugin 1 Decembrie 1918 scored 10% 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: 5.9.2
  • 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,252 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These 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: ▼2.42MB] [CPU: ▼354.76ms] Passed 4 tests

Server-side resources used by 1 Decembrie 1918
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼1.233.85 ▼15.32
Dashboard /wp-admin1.90 ▼1.504.50 ▼30.44
Posts /wp-admin/edit.php1.91 ▼1.734.36 ▼33.58
Add New Post /wp-admin/post-new.php1.91 ▼5.064.64 ▼1,333.64
Media Library /wp-admin/upload.php1.91 ▼1.394.32 ▼21.39
1 Decembrie 1918 /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php1.914.41

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 4 new options
New WordPress options
unudec1918_url
unudec1918_efect
unudec1918_text
unudec1918_title_text

Browser metrics Passed 4 tests

A check of browser resources used by 1 Decembrie 1918
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲6615.65 ▲0.005.79 ▲0.052.92 ▲0.56
Dashboard /wp-admin2,883 ▲226.13 ▼0.09119.27 ▼15.91154.73 ▼13.72
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0086.45 ▲22.70141.59 ▼6.08
Add New Post /wp-admin/post-new.php1,763 ▼922.25 ▲0.71422.64 ▼26.54162.52 ▲4.68
Media Library /wp-admin/upload.php1,706 ▲115.48 ▼0.05146.54 ▲8.32193.83 ▼42.00
1 Decembrie 1918 /wp-admin/options-general.php?page=1-decembrie-1918/1-decembrie-1918.php1,0892.4159.50152.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught 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)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > 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 | 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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings 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
There were no browser issues found

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP script in "1 Decembrie 1918" version 1.dec.2012... is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13718111
PO File1101334

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
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

All PNG images should be compressed to minimize bandwidth usage for end users
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-00.png2.07KB1.18KB▼ 43.15%
img/1-decembrie-1918-11.png7.97KB3.45KB▼ 56.75%
screenshot-1.png562.16KB141.27KB▼ 74.87%
screenshot-2.png17.80KB6.26KB▼ 64.81%
img/1-decembrie-1918-01.png4.03KB2.60KB▼ 35.43%