10% attributron-2000

Code Review | Attributron 2000

WordPress plugin Attributron 2000 scored 10% from 54 tests.

About plugin

  • Plugin page: attributron-2000
  • Plugin version: 1.0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.1
  • WordPress version: 5.8.1
  • First release: Apr 17, 2012
  • Latest release: May 8, 2012
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: emrikol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,441 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/attributron-2000/a2k.php+21
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.89MB] [CPU: ▼194.58ms] Passed 4 tests

A check of server-side resources used by Attributron 2000
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.984.64 ▼16.92
Dashboard /wp-admin1.76 ▼1.295.83 ▼33.64
Posts /wp-admin/edit.php1.76 ▼1.354.86 ▼48.86
Add New Post /wp-admin/post-new.php1.76 ▼3.676.24 ▼667.27
Media Library /wp-admin/upload.php1.76 ▼1.245.16 ▼28.55

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
dws_attributron-2000

Browser metrics Passed 4 tests

This is an overview of browser requirements for Attributron 2000
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.90 ▲0.308.27 ▼5.9451.96 ▼0.99
Dashboard /wp-admin2,967 ▲335.93 ▼0.02143.59 ▼17.49115.82 ▼14.81
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0172.04 ▼5.6493.59 ▼16.39
Add New Post /wp-admin/post-new.php1,498 ▼17418.78 ▼0.11392.83 ▲13.30121.42 ▲0.80
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.00147.28 ▼12.06130.19 ▲10.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/attributron-2000/a2k.php+21
    Constant WP_DEBUG already defined

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/attributron-2000/a2k.php:22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/attributron-2000/a2k.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This shows the Edit Media screen and the new inputs avilable.), #2 (Here is what a post would look like (with a few CSS tweaks) with attributions.), #3 (The new settings available in the Media Settings page.)
The official readme.txt is a good inspiration

attributron-2000/a2k.php 92% from 13 tests

"Attributron 2000" version 1.0.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("attributron-2000.php" instead of "a2k.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected282 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12817282

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.06MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png20.67KB20.58KB0.44%
screenshot-1.png39.23KB38.74KB▼ 1.25%