84% atticthemes-likes

Code Review | AtticThemes: Likes

WordPress plugin AtticThemes: Likes scored84%from 54 tests.

About plugin

  • Plugin page: atticthemes-likes
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6
  • WordPress version: 6.3.1
  • First release: Jul 20, 2016
  • Latest release: Aug 20, 2016
  • Number of updates: 14
  • Update frequency: every 2.4 days
  • Top authors: AtticThemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼11.94ms] Passed 4 tests

A check of server-side resources used by AtticThemes: Likes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0723.98 ▼16.99
Dashboard /wp-admin3.40 ▲0.0542.55 ▼17.03
Posts /wp-admin/edit.php3.51 ▲0.1544.90 ▼3.00
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.10 ▼10.75
Media Library /wp-admin/upload.php3.32 ▲0.0934.10 ▼0.27

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AtticThemes: Likes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.62 ▼0.679.16 ▲7.3437.23 ▼12.92
Dashboard /wp-admin2,197 ▲94.87 ▼0.24107.89 ▼2.3840.23 ▼2.34
Posts /wp-admin/edit.php2,123 ▲341.97 ▲0.0040.57 ▼2.0535.74 ▼2.34
Add New Post /wp-admin/post-new.php1,547 ▲518.65 ▲0.27647.71 ▼3.6565.66 ▲14.32
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.07100.30 ▲3.7943.13 ▲0.65

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/atticthemes-likes/atticthemes-likes.php:434

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (**Post Likes** Heres how it looks, simple and nonintrusive.), #2 (**Posts Screen** Order posts by the number of likes.)
You can take inspiration from this readme.txt

atticthemes-likes/atticthemes-likes.php Passed 13 tests

The main PHP script in "AtticThemes: Likes" version 1.0.1 is automatically included on every request by WordPress
43 characters long description:
A simple plugin to add likes to your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin482 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2151164349
JavaScript23612121
CSS24012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity42.00
▷ Minimum class complexity37.00
▷ Maximum class complexity47.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2064.52%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png59.52KB17.67KB▼ 70.32%
screenshot-2.png39.05KB12.84KB▼ 67.11%