89% pubmed-posts

Code Review | PubMed Posts

WordPress plugin PubMed Posts scored89%from 54 tests.

About plugin

  • Plugin page: pubmed-posts
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.8.0
  • WordPress version: 6.3.1
  • First release: Nov 30, 2013
  • Latest release: Jan 9, 2014
  • Number of updates: 8
  • Update frequency: every 6.0 days
  • Top authors: sydcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.43ms] Passed 4 tests

Server-side resources used by PubMed Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2346.40 ▲6.96
Dashboard /wp-admin3.54 ▲0.2347.47 ▼3.72
Posts /wp-admin/edit.php3.65 ▲0.2950.81 ▲4.61
Add New Post /wp-admin/post-new.php6.14 ▲0.2584.27 ▼7.30
Media Library /wp-admin/upload.php3.47 ▲0.2437.62 ▲4.71
PubMed Posts /wp-admin/options-general.php?page=pubmed-posts3.4333.85

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_pmp_search
can_compress_scripts
widget_recent-comments
category_children
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for PubMed Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,140 ▲39413.83 ▼0.546.05 ▲4.5039.48 ▼1.03
Dashboard /wp-admin2,423 ▲2325.26 ▲0.38124.14 ▲19.2991.01 ▲45.44
Posts /wp-admin/edit.php2,127 ▲382.14 ▲0.1536.17 ▲1.5731.69 ▼6.87
Add New Post /wp-admin/post-new.php1,548 ▲3423.25 ▲5.79678.84 ▼13.6037.66 ▼17.56
Media Library /wp-admin/upload.php1,423 ▲354.27 ▲0.0696.95 ▼3.3642.32 ▼8.38
PubMed Posts /wp-admin/options-general.php?page=pubmed-posts9391.8623.2127.56

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
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • can_compress_scripts
    • category_children
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_pmp_search
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

pubmed-posts/pubmed-posts.php 92% from 13 tests

"PubMed Posts" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 192 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected4,348 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript134892,9531,634
CSS1294661,478
PHP61473901,097
Stylus7320139

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity51.67
▷ Minimum class complexity22.00
▷ Maximum class complexity69.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods72
▷ Static methods11.39%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/question_white.png0.69KB0.60KB▼ 12.36%
textext/css/arrow.png0.17KB0.10KB▼ 42.94%
images/cross_white.png0.66KB0.56KB▼ 14.84%
smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%