62% reconews

Code Review | Reconews

WordPress plugin Reconews scored62%from 54 tests.

About plugin

  • Plugin page: reconews
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 4, 2017
  • Latest release: Oct 24, 2017
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: masaakitanaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /829 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲56.47MB] [CPU: ▲52.33ms] 75% from 4 tests

A check of server-side resources used by Reconews
Please fix the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 56.47MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /60.47 ▲57.0092.50 ▲54.97
Dashboard /wp-admin60.49 ▲57.1489.39 ▲25.73
Posts /wp-admin/edit.php60.49 ▲57.13109.08 ▲64.17
Add New Post /wp-admin/post-new.php60.49 ▲54.60157.14 ▲68.37
Media Library /wp-admin/upload.php60.49 ▲57.26100.12 ▲64.43

Server storage [IO: ▲39.29MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Filesystem usage must be lower than 25MB (currently using 39.29MB)
Filesystem: 28 new files
Database: 1 new table, 7 new options
New tables
wp_reconews
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
reconews_db_version
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Reconews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.58 ▲0.051.70 ▼0.0439.88 ▼0.20
Dashboard /wp-admin2,201 ▲275.63 ▲0.0695.02 ▲9.6542.58 ▲1.75
Posts /wp-admin/edit.php2,112 ▲152.01 ▲0.0540.10 ▲1.3937.85 ▲3.18
Add New Post /wp-admin/post-new.php1,537 ▲1121.07 ▼2.36682.70 ▲96.2357.86 ▼0.39
Media Library /wp-admin/upload.php1,409 ▲94.16 ▼0.1194.08 ▼14.4642.84 ▼7.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/reconews/uninstall.php+14
    Undefined variable: option_name
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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
Even though no errors were found, 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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'IntMemoryArray' not found in wp-content/plugins/reconews/lib/igo-php/lib/Igo/ShortArray.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'IntMemoryArray' not found in wp-content/plugins/reconews/lib/igo-php/lib/Igo/CharArray.php:7

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)
No browser errors were detected

Optimizations

Plugin configuration 79% 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
These attributes need your attention:
  • Screenshots: Add an image for screenshot #2 (設定画面)
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

reconews/index.php 69% from 13 tests

The main PHP script in "Reconews" version 0.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("reconews.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .bin - Binary Executable in Windows, macOS, Linux
      • wp-content/plugins/reconews/lib/ipadic/matrix.bin
    • .inf - Setup Information File in Windows
      • wp-content/plugins/reconews/lib/ipadic/word.inf
975 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1632688931
JavaScript142444

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods77
▷ Static methods45.19%
▷ Public methods7394.81%
▷ Protected methods00.00%
▷ Private methods45.19%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin