10% anppopular-post

Code Review | anpPopular Post

WordPress plugin anpPopular Post scored 10% from 54 tests.

About plugin

  • Plugin page: anppopular-post
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 4, 2012
  • Latest release: Sep 22, 2012
  • Number of updates: 50
  • Update frequency: every 0.4 days
  • Top authors: antocara (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,484 total downloads

Benchmarks

Plugin footprint 23% 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0

Server metrics [RAM: ▼1.76MB] [CPU: ▼50.19ms] Passed 4 tests

This is a short check of server-side resources used by anpPopular Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.97 ▼37.47
Dashboard /wp-admin2.24 ▼1.068.99 ▼36.98
Posts /wp-admin/edit.php2.24 ▼1.117.61 ▼39.71
Add New Post /wp-admin/post-new.php2.24 ▼3.648.58 ▼86.60
Media Library /wp-admin/upload.php2.24 ▼0.987.50 ▼25.91

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables
wp_postview
New WordPress options
can_compress_scripts
widget_recent-comments
widget_anp_post_popular_post
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for anpPopular Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.52 ▼0.871.80 ▼0.0543.47 ▲5.20
Dashboard /wp-admin2,205 ▲205.79 ▼0.0696.04 ▼10.2036.57 ▼5.48
Posts /wp-admin/edit.php2,080 ▼122.02 ▲0.0135.49 ▼4.9232.35 ▼4.60
Add New Post /wp-admin/post-new.php1,544 ▲3018.38 ▲0.64666.30 ▲13.0059.58 ▼0.02
Media Library /wp-admin/upload.php1,390 ▼14.25 ▲0.0798.99 ▼4.7341.26 ▼5.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_postview
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_anp_post_popular_post
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/anppopular-post/anp_popular_post.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Requires at least: Version format is invalid
  • Screenshots: Please add images for these screenshots: #1 (Option Widget on sidebar), #2 (Palette color Estandar), #3 (Palette color Green), #4 (Palette color Blue), #5 (Palette color Red)
The official readme.txt is a good inspiration

anppopular-post/anp_popular_post.php 92% from 13 tests

The entry point to "anpPopular Post" version 1.0.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("anppopular-post.php" instead of "anp_popular_post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,717 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214037788
PHP1147156428
CSS4200416
PO File1295676
HTML1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity11.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.34KB17.03KB▼ 64.02%
js/jscolor/hs.png2.62KB7.54KB0.00%
screenshot-2.png52.67KB12.28KB▼ 76.69%
screenshot-4.png55.38KB13.14KB▼ 76.28%
screenshot-3.png53.55KB12.83KB▼ 76.04%