10% 2012-summary

Code Review | 2012 Summary

WordPress plugin 2012 Summary scored 10% from 54 tests.

About plugin

  • Plugin page: 2012-summary
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 5.9.2
  • First release: Jan 9, 2013
  • Latest release: Jan 9, 2013
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: lioman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,215 total downloads

Benchmarks

Plugin footprint 58% 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
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/2012-summary/2012-summary.php+35
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.36MB] [CPU: ▼342.88ms] Passed 4 tests

Analyzing server-side resources used by 2012 Summary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.02 ▼1.504.42 ▼43.11
Dashboard /wp-admin2.03 ▼1.383.69 ▼29.63
Posts /wp-admin/edit.php2.03 ▼1.613.89 ▼35.58
Add New Post /wp-admin/post-new.php2.03 ▼4.945.69 ▼1,263.20
Media Library /wp-admin/upload.php2.03 ▼1.264.12 ▼19.38
2012 Summary /wp-admin/index.php?page=y2012summary2.034.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 2012 Summary
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲4215.93 ▲0.325.65 ▼0.172.33 ▲0.05
Dashboard /wp-admin2,876 ▲156.06 ▼0.11118.80 ▼16.17156.84 ▼5.63
Posts /wp-admin/edit.php2,693 ▲53.24 ▲0.0163.43 ▲1.62142.13 ▲2.81
Add New Post /wp-admin/post-new.php1,671 ▲317.90 ▼2.87407.54 ▼3.77151.29 ▼6.72
Media Library /wp-admin/upload.php1,703 ▲55.51 ▼0.01138.69 ▼5.42185.89 ▲2.97
2012 Summary /wp-admin/index.php?page=y2012summary1,0702.6355.31167.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/2012-summary/2012-summary.php+35
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/index.php?page=y2012summary
    • > Warning in wp-content/plugins/2012-summary/2012-summary.php+35
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/index.php?page=y2012summary
    • > Notice in wp-content/plugins/2012-summary/2012-summary.php+204
    Undefined index: y2012summary_generate
    • > GET request to /wp-admin/index.php?page=y2012summary
    • > Notice in wp-content/plugins/2012-summary/2012-summary.php+207
    Undefined index: y2012summary_draft

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/2012-summary/2012-summary.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/index.php?page=y2012summary
    • > Network (severe)
    https://tools.flattr.net/widgets/thing.html?thing=1093328 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

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
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === 2012-summary === )
You can take inspiration from this readme.txt

2012-summary/2012-summary.php Passed 13 tests

The main file in "2012 Summary" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
40 characters long description:
Get a brief summary of 2012 on your blog

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
No dangerous file extensions were detected291 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18126291

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.69KB21.76KB0.00%