84% tsp-featured-posts

Code Review | LAPDI Featured Posts

WordPress plugin LAPDI Featured Posts scored84%from 54 tests.

About plugin

  • Plugin page: tsp-featured-posts
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.6.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2013
  • Latest release: Feb 9, 2021
  • Number of updates: 64
  • Update frequency: every 43.3 days
  • Top authors: sharrondenice (98.44%)thesoftwarepeople (3.13%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /18,848 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.52ms] Passed 4 tests

An overview of server-side resources used by LAPDI Featured Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.34 ▼4.55
Dashboard /wp-admin3.31 ▲0.0144.31 ▼7.31
Posts /wp-admin/edit.php3.36 ▲0.0045.80 ▼3.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.58 ▼14.27
Media Library /wp-admin/upload.php3.23 ▲0.0033.47 ▲1.68

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by LAPDI Featured Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.181.85 ▲0.0139.20 ▼3.68
Dashboard /wp-admin2,209 ▲215.82 ▼0.0693.15 ▼23.1939.65 ▼8.51
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0339.69 ▲4.0536.22 ▼0.49
Add New Post /wp-admin/post-new.php1,542 ▲818.19 ▼5.06595.39 ▼85.0555.50 ▼0.78
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0294.61 ▼8.2941.73 ▲0.99

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

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 take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'TSP_Easy_Dev_Options' not found in wp-content/plugins/tsp-featured-posts/TSP_Easy_Dev.extend.php:12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/tsp-featured-posts/tsp-featured-posts.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tsp-featured-posts/TSP_Easy_Dev.config.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tsp-featured-posts/tsp-featured-posts.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/tsp-featured-posts/TSP_Easy_Dev.config.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/tsp-featured-posts/tsp-featured-posts.php on line 14

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: featured posts display gallery slider jquery moving boxes the software people

tsp-featured-posts/tsp-featured-posts.php 85% from 13 tests

The entry point to "LAPDI Featured Posts" version 1.3.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 201 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,725 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript577145545
PHP3110114526
CSS49387407
Smarty600215
Markdown113032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.50
▷ Minimum class complexity4.00
▷ Maximum class complexity41.00
Average method complexity9.60
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants13
▷ Global constants13100.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
9 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrows.png78.22KB1.64KB▼ 97.90%
assets/images/twitter_custom.png1.61KB1.53KB▼ 4.62%
assets/images/rightshadow.png0.14KB0.14KB0.00%
assets/images/tsp_icon_25.png3.09KB1.57KB▼ 49.19%
assets/images/tsp_icon_16.png2.31KB1.03KB▼ 55.38%